Bash the Flash.

It’s almost fashionable to bash the flash these days. Everyone is doing it, the big, the small, the wise and sometimes people who don’t seem to fully understand the argument. For a technology that has been around for almost 15 years and probably the only platform capable of delivering rich web content for the better part of that time, some criticisms may sound a bit too harsh — or, are they? Yes some of it is indeed true. Flash applications have been known to slow a brand new quad core machine to a crawl while doing nothing more than streaming a simple video. There have been more than one instances when the entire browser has frozen up because flash hogged every available resource. But, before we go flash bashing lets look at why we are so overly dependent on a technology and why suddenly after 15 years of loyal service flash has now become so much of a thorn that everyone likes to crib about.

When flash first arrived on the scene, it was this cool new technology wherein you could program interactive webpages much to the delight of web designers. But as the world would soon realize, there was a negative side to overly depend on this new technology. During those days fast internet was a luxury of only a few and flash content on websites would take ages to download and display on dial-up connections (yes, I was in the university back then and couldn’t afford a broadband connection 😀 ) . So flash adoption was initially limited. But as the internet grew and speeds increased, more and more websites started adopting flash. The logical next step for a rich content platform were games. This was exploited by flash game developers and we began to see more and more flash games being developed. Flash enjoyed renewed interest, web applications started being made with flash.

So why flash?  Simply because, there was no other. If you wanted to make a rich web application, there was no better solution. True some Javascript workarounds existed, but until recently these were pretty limited when compared to what flash could achieve. But there was an even bigger reason as to why flash got adopted, and is now on almost every computer system that connects to the internet and is used to browse the web, and that is — streaming video. Yes, there were other competing formats but most were closed ones and flash was favored over those. Only now does the HTML 5.0 standard talk about streaming video and sound. This HTML revision should have been done 10 years ago, there is no logic to this delay, but it is what it is and flash was and still is the leading tech/plugin to watch streaming videos on the Internet. The story doesn’t end there; there is still a debate about what video codec/standard to use for HTML 5.0 and patent encumbered video technologies means this debate will last a while longer. Also most streaming media sites deliver content in flash (flv) format and haven’t yet switched to HTML 5.0. So before you go blaming flash for all your browser troubles, think about it — do you have a choice? Well as it stands today, not quite.

It’s true that flash has it’s problems. But these problems were there before, so what’s changed now? The answer is 2 fold. A) People have started watching more streaming content online and as a result inadvertently use more of the flash plugin. B) There is a new technology that has silently crept up to flash — and that is your humble Javascript. As Javascript got faster, websites got faster as well. Things which were possible with flash could also be done with Javascript. Developers found new ways of writing rich web-content using Javascript (AJAX) and slowly started avoiding flash by using equivalent Javascript functionality. Mind you, I am not saying Javascript is a replacement for flash, I am saying you can now do so much more with it than you could do earlier. As a result an obvious comparison with flash was and is being made. Javascript continues to grow and with integration of technologies like WebGL it has rapidly narrowed the gap between flash and may even surpass flash in some areas.

People blame flash, but it not flash that is the problem, it’s the implementation. The flash plugin and it’s integration with the browser is what causes the pains like system slowdowns and browser crashes. Flash today is JIT compiled much like Javascript is so there are no problems there. Contrary to some who believe otherwise, ActionScript is a dialect of ECMAScript much like JavaScript and is not inferior in anyway to the latter.

According to me the problem with flash is an engineering-implementation one. ActionScript and flash aren’t deficient or outdated in any way as some would suggest. However, it’s true that the implementation is what needs to be looked at. Yes, the flash plugin has problems but it’s not the technology that is flash, but it’s implementation that is the plugin. If that were to be cured, flash isn’t at all bad.

Designing user-friendly GUI.

What is good GUI? Or should I ask what make a GUI good or bad? Is it the snazzy looks, the cool effects, transparent windows, bright colors or is it really something else? Why do people hate some GUIs and love others? Or is it only just a matter of personal taste? Somethings to really think about I would say. GUI is actually a very broad term and can mean different things for different people. For a web-site a GUI could mean the web-page. For an application it could mean the application interface. For a everyday normal computer user it could very well mean his windowing system. A GUI is a graphical interface to a system, and the system can be, well, anything really. Though this entry is more about application GUIs, most points discussed here are also directly or indirectly valid for other GUIs.

Most novice developers working on GUIs never really understand, or for that matter appreciate the meaning of the phrase “good GUI”. It is often confused with “good-looking GUI”. That however, is not the case. Yes, it is true, good GUI must look good. You or the users of your application wouldn’t want to use bad-looking GUI. However, the single most important thing any GUI must accomplish is user-friendliness. How many times have you seen a good application get a bad reputation just because it was difficult to use? I would say too many times. Sometimes a GUI can make or break your application, but often times a bad GUI can give a bad reputation to applications that would otherwise have had much wider appeal. During my initial years as a developer I worked a lot with GUI libraries, everything from MFC, Qt, FLTK, wxWidgets and learned most of the GUI design principles the hard way, mostly by trial and error.

If you were to Google around for GUI design principles you will no doubt get a bunch of sites that give you some very good subject matter on the topic. However, GUI design is more about experience. Just saying, “You must know your user”, or , “Empower the user”, or , “Know the user’s perspective” doesn’t really cut it. True, most of the data is accurate and you are more than welcome to read it. However, these are very broad phrases and often lead to nothing conclusive. As any good engineer knows, data and facts are what matter. So lets looks at some of the hits and misses in GUI design.

a) Overly bugging a user. This is probably the worst mistake that can be done by any GUI. Remember those annoying pop-up dialogs in Vista! “Do you want to really move a file”, “Do you want to install this program”, and more. Nope, please don’t do that! It will make any UI interface extremely unpopular. The main culprits are Modal dialogs. Modal dialogs are one of the most overused GUI feature. I would go so far as to say, avoid Modal dialogs except for rarest of rare cases. Only use them to warn a user about data loss. Nowhere else! Even in situations where they are used, allow the user some way to turn off the warning message boxes.

b) Use tool-tips and modeless pop-ups, and use tool-tips judiciously. I can’t understand why so many UIs use modal dialogs to present information. Tool-tips are a great way to show information and they can be extremely useful in enhancing the GUI. Use tooltips instead of modal dialogs to convey simple bits of infromation. In one application I replaced information modal dialogs with tooltips that would fade away in about 10 secs or so. They were an instant hit. Azureus comes to mind, the program uses a similar feature to warn users. Also if possible try to replace modal dialogs with modeless ones. Again modal dialogs are not all that great even for user inputs. Compare the search (Ctrl+F) in Internet Explorer 6 and search in Firefox. Which do you think is more intuitive?

c) Another annoyance is leaving the GUI unresponsive. If there is a lengthy task, please delegate it to a worker thread. See to it there is always a way for the user to cancel a lengthy and intensive task. Never ever leave the user in a state where he/she can’t interact with the UI. It’s really annoying

d) Short-cut keys are such a help. I tend to always use them. A GUI application must have short-cut keys for the most commonly used tasks and must be consistent with shortcut keys. For example; never use Ctrl-Z for pasting something, Ctrl-Z is always an “Undo” command under all Windows applications, at least correctly designed ones. So stick to it. Not all tasks need to have shortcut keys. Actually it’s not always prudent to have short cut keys for commands that involve data loss. Also try to keep shortcut keys spaced apart. OK another example here; there was a friend of mine who was working on an application where he assigned Ctrl-S as save and Ctrl-D as delete. A few months later he got a nasty mail from a client asking him to remove that Ctrl-D since the client use to accidentally hit the delete key during save. Also overly complex shortcut keys and key combos like “Ctrl+Alt+F10” are not well appreciated.

e) “Empowering” GUIs are very very popular. GUIs that allow the use of both hands can quickly become a hit. Consider the copy-paste command. Initially the combo used to be Ctrl-Insert and Shift-Insert. However for a right handed person that would mean lifting his hand from the mouse to operate the shortcut keys. So two new short-cuts were introduced Ctrl-C, Ctrl-V. Now the user can select content with a mouse and copy-paste with shortcuts using his left hand. For those who don’t know, Ctrl-Insert and Shift-Insert still work with the Windows Notepad and most other GUI editors under X. Left handed people can still take good advantage of that. Such design can really go a long way because they empower the user to work rapidly.

f) Good GUI applications strive for “Undo” and “Redo”. This is easier said than done. It requires a lot of thought and pre-planning in the design stage of an application to have a full functioning Undo-Redo functionality. However this is a “must” in today’s GUI design. Can’t escape it. Hint: If you want to use Undo\Redo in your application, apply the Command and Memento design patterns to your designs.

g) Tool-bars are friends. Tool-bars are also a must for all but the most trivial applications. True some applications are too small to have toolbars. But the rule of the thumb is if an application has menus, it should also have tool-bars.

h) Another thing I hate is, deeply nested menus. If an application has to have them, then it must have a separate tool-bar for those menus. Deeply nested menu-items can be difficult for the user to locate. I have seen this, maybe not too often, but sometimes applications do have some commonly used functionality deeply embedded in the menu hierarchy. Not too well appreciated I must say.

i) Applications that fail to set the tab order on dialogs can quickly become unpopular, especially with laptop and notebook users. Same is the case with accelerator keys for input widgets. I have seen really good and professional applications miss out on this point.

j) Good GUI designers try to conserve space, but never go overboard. A GUI should not cram widgets, however intelligent choices while selecting widgets can go a long way. For example; often times a combo-box/choice-box will require far less space than a list box and provide equivalent functionality.

k) Readability is another factor. Sometimes snazzy looking applications with all those “skinnable” interfaces can make a mess of it. I generally try to avoid skins, custom fonts or custom colors. It is best to use system default colors and fonts since such GUI scales across systems that may have different settings and hardware setups. It is also best to go for flow layouts or sizer based GUIs. This allows for full compatibility even across platforms and with different windowing systems.

These are probably only some of the things that can go wrong with GUI design. There maybe more, but maybe I got a little bit tired with typing, and maybe you have too (, after reading such a long post). I will just leave you with this link. I think some very good points are addressed there. Have a peek if you are interested.