30Jun The Future of Language Interfaces

Ever had one of those times where you had quickly dismissed a piece of software only to find how essential it was after giving it a try later on? This happen to me roughly last week when I had issues with quick launch icons and desktop shortcuts. I had so many shortcuts that I had to organize icons in folders… and even the folders started to litter the desktop. While the Windows Vista’s start search bar is helpful, it does not allow (with the exception of some hacks) the use of custom commands and doesn’t supply any configuration options for its search index.
I needed a better solution for quick access to directory folders and applications…
I then remembered a program called Launchy that was a more customizable search bar. After I got it setup, I suddenly realized how vastly superior it was to my horde of desktop and quick-launch icons. Ultimately, I ended up switching from Launchy to Executor as it better support for custom commands. These commands can perform what would be several manual steps in just one keyword which is rather handy. Humanize Enso (the desktop grandfather project of Ubiquity) looks to help bring friendlier human language syntax than either both previous applications, but personally I find Executor able to do everything I need it to do.
After playing around with these applications, I remembered that Firefox had a similar plugin called Ubiquity that did something like this except for website related content. Between Ubiquity and Executor, I can execute almost any function of my computer within a few key taps. This means I have really no need for desktop icons or a quick-launch bar which removes a ton of visual clutter while still being efficient at accessing my commonly used applications.
While I think language interfaces are a fantastic way to eliminate clutter and improve efficiency, I don’t think they are a replacement for GUI interfaces as most current implementations have done (like Bash, Ubiquity, Launchy, etc). It would be a neat concept to try to merge the two methodologies into one interface… perhaps starting with a language interface and switching into GUI modes when the user needs finer control for complex input.
It will be really interesting how well into the future projects like Ubiquity and Firefox Awesome Bar are accepted into the general public. My main concern is if beginner to novice computer users are able to unlearn GUI control in exchange with keyboard hot-keys and human language syntax.
Here are two interesting articles on the subject that are worth mentioning:
Why Language Interfaces?
Problems with Language Interfaces?
17Jun Why HTML 5 is NOT a Flash killer
The RSS feeds are abuzz lately about the new W3C standard of HTML 5 for browsers. In my opinion, the new standard defines new features that are way overdue. Canvas drawing and video playback are features that should have been implemented nearly 10 years ago. Perhaps if the W3C had their act together a bit more, we would have HTML 9 by now. I digress; the point is, Flash or any other multimedia plugin is not going to be threatened by HTML 5. Video playback and simple canvas drawing only steals the boring work from Flash development.
The misconception is that people associate video playback as a major reason to be using Flash since it is a common use for websites. Even in the video playback category, Flash player will still live on. Features like secure streaming, dynamic buffering, and rich video controls will keep professional from switching technologies. It seems like the people who are hyping HTML 5 the most are HTML developers who are daunted by or have a disliking towards Flash. I do not blame them as it is a hassle to create a Flash video player for just showing a simple video on a web page. However, the notion that HTML5 can kill off Flash, Silverlight, Unity3d, O3D, or any other rich multimedia plugin ignores the facts that these tools were created for large scale Application, game development, and even 3D multimedia development. You could argue that someone could write a 3D engine that uses the Canvas, but it wouldn’t have the speed as a plugin that has access to low level processing and video card integration.
What I am trying to say is, use the right tools for the job. Silverlight is a multimedia tool meant for .NET developers. Flash is a multimedia tool meant for non-programmers and Java-style developers. HTML is a great tool for web page markup and some presentation content. Trying to bend a tool beyond their intended use is only abusing the platform. Picking the right tools for the job is the most important project decision you can make.
Soapbox ranting aside, I will be working on uploading more advanced examples for FlashMVC as soon as I have some more spare time.
02Jun Cing from Java – C++ quirks
Lately I have been toying around with Visual C++ to rebuild some of my pathfinding algorithms done originally in AS3 and CSharp. While working on porting the code over, I can’t help to feel that OOP was just slapped into C++ from C. I might be getting this feeling as I use mostly Java inspired languages (yes, CSharp is also very Java inspired) that had a lot of forethought on how OOP should work and how developers implement it in their code. For example, it seems counter-intuitive to me to declare methods that float somewhere outside the class definition brackets. Also, it seems confusing to me that you declare the default values for method parameters in the method prototype and not in its definition. Additionally, why isn’t the compiler smart enough to look ahead for a function/method declaration instead of requiring the user to manually create extra code prototyping their existence. Perhaps Java-like languages has spoiled me, or I don’t see the “big picture” yet on why the language acts the way it does. Anyone from a similar background wonder the same thing about traditional C++?
02Apr HaXe vs Unity3D vs XNA vs others
For the past couple months, I have been trying to determine the best platform to become my primary language for game AI unit development, shaders, and working on theories of improving the Fridge-A* algorithm. However, choosing the right language has become an arduous task. Hardcore programmers will scream “C++ is the only way to go!” while the elites say “C is so much better than C++” and of course there is that one guy who comments “Why would you use anything other than Assembly language?” The problem lies in the fact that I am doing this work on my own and do not have XX hours to write an elaborate garbage collector, manage raw threads, or constantly keep track of hundreds of pointers. On the other hand, I must have enough speed and processing power to do the research and development I want.
Some suggest Java as a game platform as the language is respectable. However, graphics rendering speed and the Java gaming community is poor at best in my humble opinion. I did enjoy using BlitzMax back in the day, but the engine is simply not powerful enough to create something near commercial quality. Also, the popularity of the language is low, and I would have little professional use for learning more of the language. Flash AS3 is my primary profession; however, its performance leaves much to be desired at times. On the other side, Silverlight 3 is looking rather nifty, but the API still looks funky and doesn’t seem like the engine is really mature enough to do any major development in. Perhaps, if Silverlight 4 has near XNA speeds, better shaders and bitmap drawing, and the XAML to C# connection has less oddities in the API… it would be a contender for my list. Aside from the web platform, I could also go for a super high-end engine like Unreal Engine 3 or Source, but I couldn’t ever hope to produce something commercial with it because of the insanely expensive licensing (hundreds of thousands we are talking about!). Of course this is also Torque, but I have not been impressed with any of the games made on the platform, and there is a moderate cost to get started with it.
So I eventually evaluated my choices to XNA, haXe, and Unity3D:

Pros:
- Very fast (Fastest of the choices)
- Great shader support
- C# is a nice language with advanced OOP support
- Xbox and Windows deployment
- Free for indie users
Cons:
- Meant really for just the xbox… there is little support for Windows only deployment and DRM concerns. Also, no luck for Macs.
- Unlike the other two, XNA cannot steam which means a smaller audience because of the hassle of downloading
- Super new so the community is not that large in general

Pros:
- Compiles out to Flash which 98% of users have already installed
- Real-world benchmarks show 2x the speed of Flash 9 using code performance optimizations unique to haXe
- From working with haXe, I will use that same knowledge to build javascript and neko scripts in the future if I wanted
- I can use my existing knowledge of Flash to accelerate my development
- Totally free
Cons:
- No Flash IDE
- Also super new with a small community and little to speak of tutorials
- Still slower than unity3D and XNA
- Currently does not support importing Flash libraries which reduces the amount of existing libraries I can bring over versus just using Flash AS3.

Pros:
- Fastest of the web 3D engine… also nice looking
- Supports developed on Macs and now Windows
- Uses Python for scripting
- Supports large number of users for networking and shaders
Cons:
- No free version to try things out (only 30 day trial)
- Costly software (the indie license has a terrible roster of features making the Pro version the ideal choice)
- Little resources and support for making 2D games… everything is geared for 3D development. This can be a negative thing for me as I like to develop quick 2D testing scenarios for AI scripts. From what I can see, there are few tools for doing advanced bitmap drawing.
Final thoughts:
In truth, I have not made up my mind yet. The pros and cons of all the solutions seem to make every choice the same weight in how it appeals to me. I could forsake all the above options and just go with C++ with Allegro or SDL, but they too have their ups and downs. Allergro is really slow without full DirectX/OpenGL support and SDL seems to have an aged API with little in the future for it. Also, neither of those libraries natively support shaders. XNA would give me all the speed I would need for what I am trying to accomplish, but using a language that streams over the internet would give me a much wider audience.
Well, what do you say readers? Are there other languages I should be looking at? For my next post on the subject, I will try to make some benchmarks in all of the three languages to test their true strengths.
27Mar Further Reading on Design Patterns
As a followup on my Wednesday lecture on design patterns, I wanted to post some informative resources for learning more about design patterns outside the next lecture on the topic. Also, I wanted to say thanks for everyone who showed up to hear me rant about code structure (not the most exciting topic in the world mind you)!
Design Pattern Definition
In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved.
- read more at WikiPedia
MVC Definition (the most common principle of Design Patterns)

“Model–View–Controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the model represents the information (the data) of the application; the view corresponds to elements of the user interface such as text, checkbox items, and so forth; and the controller manages the communication of data and the business rules used to manipulate the data to and from the model.”
- read more at WikiPedia
Books:
- Gang of Four’s original Design Patterns
- Advanced ActionScript 3 with Design Patterns (highly recommended)
- ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques
AS3 Design Pattern Informational Websites:
- www.as3dp.com – ActionScript 3 Design Pattern Blog (Principles Category)
- ntt.cc posts on of porting GoF design patterns to AS3
Flash Design Pattern Frameworks:
(for now, it’s best to avoid these until you understand the fundamentals of MVC)
Good Design Priniciples:
- ALWAYS type your variables (not really design principle but I too often see people doing this still)
- An object/MovieClip should contain the actions that it performs (as oppose to objects outside the class forcing it to perform actions)
- A class should never be able to “break” if the user sets a property or calls a function on it when they are not suppose to. Keep preventive logic in the class that’s doing the work.
- A good chosen design pattern for a problem will not take any longer to implement than not using it with spaghetti code.
Feel free to leave comments or email me about any further questions you have about Design Patterns or where to find additional materials on it. Have a great weekend everyone!
07Jan A New Kind of Science, Indeed
After reading Stephen Wolfram’s A New Kind of Science, I was impressed by the conjecture of the book (it has since been awarded several scientific awards), and I thought I would share here some musings I had after finishing it. The core ideology of the book is Reductionism which describes using simple programs to explain and reproduce complex systems that occur both in the virtual and physical world. As listed in the book, the definition of a “simple problem” is as follows:
- Its operation can be completely explained by a simple graphical illustration.
- It can be completely explained in a few sentences of human language.
- It can be implemented in a computer language using just a few lines of code.
- The number of its possible variations is small enough so that all of them can be computed.
23Dec CardSpace Fail?
I remember once Microsoft CardSpace was announced and shown to a group of MSDN members that I was apart of here in Detroit. The idea seemed fantastic- finally a way to secure user’s online identity and allow the user to relay the needed information to online applications without having to fill out forms anymore! However, there was some technical obsticles I foresaw. The biggest one being the solution was “magic”. The technology used a specialized IE plugin for integration (something that Chrome and until recently Firefox wouldn’t have), and uses technology paradigms that are not used commonly in the programming community. This not only locks down the platform, but the technology is incompatible to systems that do not have a Microsoft built extension. In addition the platform requires low level access to the operating system for security precausions meaning the OS needs to have been made with a special sandbox environment specifically for the application. Novell has been working on their implementation of CardSpace, but I have doubts about the user adoption rate.
What I am trying to say is CardSpace was an amazing concept, but it has failed to appeal to both the larger developer community and end users. I see single Firefox plugins that fill in forms having much more popularity and community buzz. They require nothing of the developer of the site, easy startup for the end user, doesn’t require the OS to support certain features, requires no installation (other than the browser plugin), and the concept is very logical to follow.
The only other idea that could have a higher adoption than these generic browser plugins would be a global informtion site that your personal form information could be tethered from. However, this would require a big name behind the project as people would not trust a service with all their personal information that they didn’t already have some form of trust with beforehand. Who could it be? Google perhaps?
On a side note, an excellent Firefox plugin for filling out forms is Sxipper
.
18Dec Why Google Native Client is not a Flash competitor
There has been a lot of buzz around the internet about Google’s new development project called Native Client. This very ambitious project attempts to being desktop applications to the web browser. This project has a very long road ahead of them as it becomes extremely difficult to regulate an application that is able to access hardware or low level software hooks at will. However, even when this project is able to find its feet, it is NOT a competitor to online interactive mediums like Flash or Silverlight. This is because desktop applications are tailored to the desktop platform. Sure, Native Client can run the game Quake through the browser, but why wait downloading 100+ megabytes to play the game inside a small browser window when you could download it in its original form and play it on the desktop? The platform is simply not web-friendly at its core. Having said that, perhaps one day once the internet speed is as fast as desktop HDs and Native Client is able to execute code without any dependency on the operating system, that would be golden. This would allow browsers (like Chrome) to literally be the operating system for the computer. However, while Native Client may be backwards compatible, Flash, Silverlight and JavaFX are working hard to bring OpenGL acceleration and near-desktop math processing support. These platforms are much more web-friendly as they are optimized to be compact and able to stream load their code during runtime (which is highly valuable when you are considering enterprise-class applications).
I’m still very annoyed by the fact that Flash, Silverlight, and JavaFX are all roughly 10 times slower in basic math operations than pure C# or any other desktop platform.
04Dec Programming News Week
Here are some random tidbits of news headlines and links I found of interest this week:
- PHP 5.3 will support Lambda functions/closures
- Python 3.0 released – backwards incompatible but contains much more logical syntax.
- Adobe Alchemy is it actionscript heresy? – good article stating that Alchemy could be little to no faster than AS3 once the compiler is optimized.
