Pinderkent

Pain and glory from the trenches of the IT world.

Will Chrome OS be the most innovative consumer-grade operating system since BeOS?

Posted on Thursday, November 19, 2009 at 2:04 AM.

Earlier this year Google announced Google Chrome OS. Subsequently, some early indications of what it may offer came to light. And now there will apparently be an event held soon, where further details pertaining to Chrome OS may be made available.

I am interested in seeing what Chrome OS may offer us. Based on the original announcement, it sounded like it would bring some fresh ideas to the table. This is something we really haven't seen for well over a decade now. Modern mainstream desktop operating systems like Mac OS X and Windows 7 aren't overly different from their equivalent releases of 10 to 15 years ago. Mac OS X is still remarkably similar to NeXTSTEP and Mac OS 9 and earlier, while Windows 7 still follows the concepts introduced with Windows 95.

Looking back, the last truly innovative desktop operating system is likely BeOS. I covered many of the excellent design decisions behind BeOS in an article earlier this year. In short, it was far too many years ahead of its time. It's only today that we're getting the hardware that it would excel on. And although the original BeOS implementation can best be considered dead, the Haiku project has been making good strides creating an operating system inspired by it.

If Chrome OS can bring even just a fraction of the innovation that BeOS brought, I think we should be able to consider it a success. Unlike BeOS, Chrome OS has a powerful backer, which may very well be what it needs to become a mainstream competitor to the existing consumer-grade operating systems that are widely used today. So I'm looking forward to the upcoming announcements regarding it, and hopefully we'll be able to start using it out quite soon.

Permalink: http://pinderkent.phumblog.com/post/2009/11/will_chrome_os_be_the_most_innovative_consumergrade_operating_system_since_beos
Share:

Functional programming JavaScript is a dead-end exercise.

Posted on Saturday, October 31, 2009 at 4:30 PM.

Yesterday a colleague forwarded me the link to Underscore.js. It's a JavaScript library that provides some functions commonly offered by functional programming language implementations.

Now, I can understand completely why JavaScript programmers would desire to use such techniques. They bring some very clear and powerful benefits, including shortened development time, fewer lines of code, greater flexibility, and improved readability. However, I do hope that JavaScript programmers using such a library don't come to think that they're actually doing functional programming.

One of the most significant areas where JavaScript fails with respect to functional programming is immutability. Current implementations have spotty support for constants, leading to various workarounds. So while it's possible to manually avoid state changes as much as is possible, it becomes difficult to do when performing browser-based JavaScript development. And it's almost always better to have the language implementation strictly enforce const-ness, rather than trying to have developers communicate this intent through all-caps variable names, for instance.

Many functional languages also offer very rich pattern matching functionality, which we just don't get with JavaScript. While some people have tried to implement pattern matching in JavaScript, it is nowhere near as clean or natural as pattern matching in Haskell or pattern matching in Erlang.

Many, but not all, functional programming languages also offer strict, static typing. There has been much debate about the pros and cons of the various typing techniques employed by various languages. In the end, however, experience shows that static typing results in higher-quality software, and static typing saves developer time. Unfortunately, JavaScript as a language, as well as its current widely-used implementations, don't lend themselves to strong, static typing.

It also doesn't help that JavaScript came mainly from the imperative and prototype-based OO world, and is only now trying to adopt features and techniques from the functional paradigm. It's often much cleaner to start with a purely functional language, and then add useful imperative features like for loops and references, as was done with Objective Caml. So the language and standard libraries have a functional feel to them, and naturally encourage the use of functional techniques, yet still allow the use of imperative features where they may prove to be the best option.

In many respects, I see trying to do functional programming in JavaScript much like doing object-oriented programming in C. While it can be done, to some extent, it never feels very natural because it lacks support that should be provided at the language level and by the implementations of said language. GObject is one of the most widely used C object systems, and as anyone who has written even a moderately sized GTK+-based system in C knows, it's not a very pleasant ordeal. Languages like Objective-C and C++ offer a much more developer-friendly experience.

So I see trying to add features and techniques from functional programming to JavaScript as generally being a pointless exercise. It may help in some cases, but ends up just masking the symptoms of a greater problem, namely that we want (and maybe even need) a true functional programming language available in all of the popular Web browsers. I've suggested Haskell in the past, but just about any functional language would be better than JavaScript.

Permalink: http://pinderkent.phumblog.com/post/2009/10/functional_programming_javascript_is_a_deadend_exercise
Share:

Analyzing existing databases and their relationships with applications.

Posted on Saturday, October 17, 2009 at 3:24 AM.

Anybody working on business applications these days will undoubtedly have to familiarize himself or herself with one or more existing databases. These databases have often been "grown" rather than designed in any meaningful way, and thus will be littered with unused tables, unused functions or stored procedures, missing constraints, poor normalization, and a host of other problems.

Developers in such a situation will often look for an easy way out, such as the use of tools to automatically reverse-engineer various parts of the existing database or databases. While these tools can be useful, I don't think they are ever a replacement for just stepping through the code, line-by-line, and observing exactly what queries are executed.

Depending on the application, it may even be a bad idea to try and think of the application and database as separate. Many times we find that one can't exist without the other, and vice versa. For instance, we find hard-coded SQL queries within the application code written in languages like Java, PHP or C#. In such situations, one literally has to take a debugger and step through the application code in order to get even a basic understanding of how the system works.

Another thing that may be worth avoiding is trying to understand the system all at once. Often, it will take many months to truly grasp even a moderately sized application and the database behind it. As changes are made or bugs are fixed, take a moment or two to study and document the code paths that are involved. Doing this on a daily basis will eventually expose a developer to large portions of the software system they're working with.

Regardless of the approach, one thing to keep in mind that it's not an easy task becoming familiar with existing codebases and databases, especially when they're as ugly as so many real-world systems are. Give it time, remain patient, and eventually the system will start to feel much smaller and manageable.

Permalink: http://pinderkent.phumblog.com/post/2009/10/analyzing_existing_databases_and_their_relationships_with_applications
Share:

"Utility" or "helper" classes are a sign of a language defect.

Posted on Tuesday, October 06, 2009 at 2:03 AM.

Chris Eargle recently wrote about so-called "utility" or "helper" classes. Within his article, he states that "There should never be a Utility class which is used as a general bucket. Every method in your system means something, it belongs somewhere." I can agree with this sentiment, nor can I necessarily argue in favor of using such classes. However, I do think that a tendency for developers to create such classes indicates that there is likely an inherent flaw with the programming language that they're using.

We most often see "utility" or "helper" classes arise when using languages like Java and C#. When first developed, these languages took an OO-or-nothing approach. This isn't surprising, especially in the case of Java. When it arose during the 1990s, the software development community as a whole was generally quite enthusiastic about object-oriented programming. So one notable feature it is missing is the traditional function.

Many OO purists will decry the functions and procedures that are native to many imperative languages. They claim there is no place for standalone functions within object-oriented languages and well-designed software. But it really just comes down to a typical clash of theory versus pragmatism. When developing real-world software, sometimes a plain old function is exactly the tool that we need.

So while languages like C++, Python and even OCaml allow for both functions and objects to be used, Java and C# unfortunately do not. Developers using languages like Java and C# have to resort to abstract classes with static methods, or similar workarounds. As Chris notes in his article, this isn't an ideal situation by any means.

Given that we, as a community, now have many more years of developing software using object-oriented languages and techniques, I think it's safe to say that our tools may need some minor modifications. Languages like Java and C# are missing an essential construct, and that construct is the function. Like any tool, functions can be misused. But as we've seen, their absence can result in other hackish designs that pose several problems of their own. So perhaps we will eventually see this deficiency addressed by adding functions to such languages, so we can use them when they do prove to be the best tool for getting the job done.

Permalink: http://pinderkent.phumblog.com/post/2009/10/utility_or_helper_classes_are_a_sign_of_a_language_defect
Share:

Firefox 4.0 to bring a significant degree of UI inconsistency?

Posted on Thursday, September 24, 2009 at 2:15 AM.

Early last month I gave my opinion about some OpenOffice.org UI prototypes. In short, I wasn't too impressed. Unfortunately, we now see similarly flawed ideas coming out of the Mozilla Firefox camp with their "Windows Theme Revamp" project.

Take, for instance, this proposed design for the Firefox 4.0 UI. I do realize that it's a very early proposal, and will likely be subject to much change. However, it looks to me like it's heading in a very bad direction from the very start.

My main complain is the complete lack of consistency we're seeing. Functionality that was previous organized in a sensible and accessible manner within menus and toolbars is now spread out haphazardly throughout the top of the window. We have buttons to the left of the browser tabs, along with some to the right. Within the buttons to the right of the browser tabs, one button looks like a browser tab, while the other doesn't. We have various kinds of buttons around the URL bar, and some within the URL bar itself. Then there are what seem to be "Page" and "Tools" dropdown menus at the right-hand side. While likely similar in functionality, these dropdowns and buttons just aren't graphically consistent with one another.

Something that recent UI designers seem to forget these days is the benefit of textual labels. Traditional menus often do a good job of using text to explain the different actions that are available. These days, however, we get icons that probably were descriptive to the designer, but don't mean a damn thing to many of the users stuck using their design. At a glance, I have no idea what clicking on the hat-shaped thing next to the "+" tab in the tab bar would do.

Another uncertain aspect of the design is what clicking on the button to the left of the "Page" dropdown would do, the one with the picture of a book containing a star. I assume it involves bookmarks, but would that bookmark the current page, or would it just expand the dropdown? That isn't clear from just looking at the button. It also isn't clear what the relationship is between that button and the star within the URL bar is. Contrast this to the "Bookmarks" menu of Firefox 3.0, which by its label clearly indicates that it involves bookmarks, and has a very clear "Bookmark This Page" item at the very top.

I'm not sure what drives these UI designers to create these completely inconsistent and unfriendly user interfaces. It's almost as though they're trying too hard. They're making changes and breaking with tradition not to truly improve the user experience, but rather just to be "different". And that's not the way to go. It's good to be different when those differences bring some benefit. Unfortunately, we just don't see that with the differences proposed in the recent OpenOffice.org and Firefox 4.0 design proposals. As a user of both pieces of software, I hope that these design proposals don't become reality. They'd seriously hinder the usability of those applications.

Permalink: http://pinderkent.phumblog.com/post/2009/09/firefox_40_to_bring_a_significant_degree_of_ui_inconsistency
Share:
Feeds
  • RSS 2.0 Feed
  • Atom 2.0 Feed
Tags
Archives