About Me
I am a software engineer, currently working in Bali. During my (almost non-existent) spare time, I like hacking Linux, coding for fun, playing computer games, jamming with my saxophone, and last but not least, spending time with my girlfriend.

So the Tablet is Real After All…

So today Steve Jobs announced the iPad, after more than a year of successfully making the public speculate and generate free publicity.

This will also mark my coming back to this blog, after almost a year of complete abandonment.

Where have I been all this time? Well, nowhere. I just haven’t had the will to write. Mental block, some people call it. Not that I have not learnt anything new anyway, but the last few months of work has been primarily requirements gathering and analysis.

The kind of work associated with requirements gathering is tougher than coding, by a lot. I now have even greater respect for those people who call themselves ‘business analysts’. Well, all I have done was just organizing documents from the client (whom until now has been looking for a better way to manage information other than email – the team suggested a change but was unable to convince the management), but the real challenge is how to organize these documents so they do not flood my team (myself included) with emails, and at the same time, decrease confusion (wordy and inconsistent requirements documents are coders’ public enemy #1, not to mention confusing terminologies, often with multiple meanings).

Well, wiki comes to the rescue! The team, after looking at the millions of alternatives, chose XWiki. Although it has been developed since 2003, same year that MediaWiki (most popular wiki software, partly due to the ubiquity of Wikipedia) was also developed, it has more built-in organization features (like the notion of ‘wiki space’). Its weakness is relative unavailability of plugins and extensions (about 40 applications (some not updated and not working on the latest version), and 40 plugins(similar status)) compared to MediaWiki (thousands of extensions). When a client requested a feature to globally edit article sections, I could not find such plugin already developed (although there are ways to work around it, they all amounted to about similar number of clicks and about the same level of obscurity as if using the traditional Microsoft Word and PDF documents).

Anyway, time to go to work.

Is Creating a Compatibility Layer Worth the Time?

I’ve been asking myself this question since I officially became a part of the computer industry… is creating a compatibility layer worth the time?

Before that, perhaps I should explain what a “compatibility layer” is. It is a separate project that sits between a 3rd party library and the project(s) that are our actual client project. Its primary function is to provide stability for the client project, so whenever there is a new 3rd party library that we want to use, we will already have standardized API and can simply extend or replace existing classes in the compatibility layer.

Of course, it costs considerable manpower to create such a compatibility layer. It will take a lot more hours to create such a project than if it were implemented directly on a 3rd party library. Not to mention:

  • If we model the compatibility layer according to one library (or even create our own class models), another library may not be using exactly the same paradigms and constructs, so whenever time comes to replace one particular library, it will also become a tough challenge.
  • The software that we write will require more resources to run, because of this additional layer that doesn’t actually do any real work.

A couple of years back, the team chose not to create such a layer. We paid a hefty price; when there was a decision to “tone down” our application from 3-dimensional to 2-dimensional, our first reaction was … “WTF?!?!” because that would mean restarting nearly from scratch, with a new library.

So now I’m back with the question. I am currently struggling to juggle between the 3rd party modules for Google Web Toolkit (GWT):

  • GXT (a.k.a. Ext-GWT, ExtJS’s own GWT add-on; our current standard, but we want to replace it because it recently adopted a viral license – not good for commercial projects)
  • GWT-Ext (a free (LGPL) 3rd party to the Ext library – but itself controversially depends on the last version of Ext library that was still non-viral (and had ambiguous licensing terms), and is no longer maintained by its author)
  • SmartGWT (an emerging next-generation library for GWT; better back-end structure (based on the more mature SmartClient, compared to the younger ExtJS), a more liberal license (LGPL), but unfortunately still in beta and its features are rather limited)

So is it worth the time to create such a layer? I’m still too much a newbie in the area of computer industry to answer this question unambiguously. What do you think?

Technorati :
Del.icio.us :
Zooomr :
Flickr :

My Writing Style

These days, I tend to shy away from writing verbose documentation with no breaks. I do that on purpose.

Having worked as a technical writer for a year, I know that the most complete document is not quite the answer in most situations. Even with the most complete document, people who read the document will still come to me to ask where things were. (And it does help a lot in the requirements process, where we are gathering data that will become the goals and constraints of the software project).

People are somewhat dumb by design. They will not look into things if they don’t have to. They would rather complain behind the writer’s back, too, than telling the writer that his document is incomplete (or complete but somewhat disorganized). They only like reading novels or magazine articles for entertainment. Reading 100-page documents is just out of style (or in their formal word, “work-like”).

I thought, hmmm… it doesn’t have to be this way.

These days I tend to choose pictures. A storyboard like this can definitely convey more than a thousand words worth of explanation:

IMG_6756 (Small).JPG

Another way to chart ideas is by utilizing mind-maps. Here’s what it looks like:

MindMapGuidlines.JPG
From Wikimedia

What do you think? Is written document out of style? Is there a better way to document thoughts and processes, than verbose document writing?

The GWT-Ext Best Practices part II

As I venture into the deeper depths of the GWT/GWT-Ext and AJAX RIA game, I discover a lot of intricacies and eccentricities surrounding its existence.

I learnt that the base library of GWT-Ext, the renowned ExtJS, has undergone a recent license change (towards becoming a more commercial product) and infuriated many in the open-source community.

I also started learning a few tricks to speed up the otherwise very slow compilation process… I’m hoping these tips can be of good use to others:

Compiling GWT Takes a Long Time, so script away…

Because compiling a GWT project takes a ridiculous amount of time, we should try to make use of its XML facilities. We can make use of the GWT-Ext’s TreeLoader / XMLTreeLoader and GWT’s own XMLParser, and load data (or even a tree structure) dynamically. If you ever need to update the menu, all you have to do is change the configuration XML, instead of recompiling the whole mess of HTML + CSS + JS produced by GWT.

Create Your Own Event Objects

GWT-Ext relies on injected event objects to function properly, especially in those pages which require custom grids capable of adding or deleting rows and displaying different grid layouts dynamically, depending on the data received. Create your own classes of events and reuse them!

-

I suppose tips are never complete without sample code. I haven’t had time for that. Next post will hopefully come with sample codes.

The Dangers of Shopping…

This is a repost from my main blog at http://www.wiputra.com

No, I’m not talking about that kind of shopping where I’d go to a mall and spend a whole month’s salary there. Nobody does that except women who need better men in their lives (Women, please date geeks. You won’t regret it.).

This kind of ’shopping’ can potentially be more evil than that. It is when we are early in the design stage of software development, and there is nothing technical that has been decided whatsoever.

So you ask, what should I begin with? Should I code from scratch? Should I use a framework? If I use a framework, which one should I use?

Considering the number of software frameworks out there (even Apache alone has dozens of them… and at least three for database management alone) it is possible that we might spend weeks, even months, just trying them out. In the meantime, the client keeps paying us, and we are unaware that they are watching us unhappily, as though we are sucking their money out of them without giving anything in return.

So what do we do? How do we get around this issue of ‘eternal shopping’?

I guess we should set some time to play around with a framework or two, and then get on with our lives. An application may not be better if we write it from scratch. It may not be more efficient, and it may not even be as maintainable. But there is one thing that we can do with the software we wrote on our own that we can not do with a framework.

That one thing is…… if it doesn’t work well enough, throw it all out and start again.

What do you think?

Technorati : ,
Del.icio.us : ,
Zooomr : ,
Flickr : ,

GWT UI Designer, sneak preview

GWT_UI_Designer.png

Have you tried building an application with GWT? Sick and tired of waiting for those ‘Refresh’ cycles that seem to take forever (even though you probably only changed the length of one text field)? So were we…

This is the initial construction of the GUI builder that we are developing. The other part can be seen at my friend’s blog: http://luvj.wordpress.com/2009/02/18/gwt-ui-designer/

Initially, support will be limited to a very small subset of these widget libraries:

  • Native GWT
  • GWT-Ext
  • SmartGWT
  • Ext GWT a.k.a. GXT a.k.a. MyGWT

We will integrate these at some point this week… stay tuned…

Technorati : ,
Del.icio.us : ,
Zooomr : ,
Flickr : ,

The GWT-Ext Best Practices

It’s been a while since I’ve written anything. For the past four months I have joined a new company and we have been busy designing a new web service for an Australian client.

Having been jumping around initially, from .NET, to later Java Struts, then HTML+CSS+JS, I have finally landed on the land of GWT. What is GWT?

Together with GWT-Ext, GWT can help you make your next Internet application rich without you ever touching JavaScript. And that’s great news, since type-checking and debugging is way easier in Java than in JavaScript. (Still, it wouldn’t hurt if someone can make a WYSIWYG designer application for it… but I think for now we have to get our Java hands dirty – not that I don’t like it that way ;) .

Here are some of the things I recommend that everyone using GWT-Ext doing. These are my personal preferences and, while can be made “best practice”, are certainly my opinion alone.

Extend the GWT-Ext Panel class

Why? Well, it makes me think more clearly. I can now say that all objects within my UI package are panels! Just add the panel objects together for a complete GUI!

Put all constructing commands in constructor and extract methods often

For complex panels, the main constructing function (the constructor, assuming you extend your Panel class) will expand to 200 or so lines easily. If you use Eclipse, use its extract method refactoring facility often. This way you can organize code by its function, and it will be more manageable.

Keep your enumerations in String

Don’t use Java enums. You’ll have to use a static class to forward any information from one Panel to another anyway (the information is most likely in a form of String object!), so Java enums will only add more maintenance load later. Yes, you’ll have to live with a lot of if-and-then’s for your factory classes, but I think that’s a good trade-off compared to forcing to use constants and enums.

Document as you code

I can’t stress that enough, and it’s just as applicable in Java as it is on any other platform. Eclipse and NetBeans have made it very easy for you; you just need to type in your explanation above the function you just declared (denoted within the /** { JavaDoc tag } */)! Both Eclipse and NetBeans can parse these information snippets and trust me, when you come across your own buggy code two months later, you’ll need it. Take time writing it; it will save you a lot of time and confusion down the road. Don’t be lazy!

Technorati : ,
Del.icio.us : ,
Zooomr : ,
Flickr : ,

The Weird MetaBase Problem with ASP.NET and IIS

An oddball I’ve run into twice during my relatively short IT career is this:

After painstakingly trying to get a web service up and running, and using IIS as the server, I get this error:

System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase. The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

Microsoft has a Knowledge Base article here: http://support.microsoft.com/kb/267904 but I found that it is somewhat misleading. Why did I think so? Because any web service need to use IUSR_MachineName. If the said anonymous user account does not have permission, it wouldn’t display the MetaBase error message at all.

The real cause is, more often than not, IIS that was installed after the need for it arose when using Visual Studio. (Note to self: for future XP installations, IIS should be installed up front, if the machine will be used for Windows development!) Apparently this affects both IIS 5.0 (Windows XP) and IIS 6.0 (Windows Server 2003).

So this is what I will do:

  1. Open Start Menu – Programs – Microsoft Visual Studio 2005 – Visual Studio Tools – Visual Studio 2005 Command Prompt (the regular command prompt doesn’t work, because the paths aren’t set to run Visual Studio executables)
  2. Type aspnet_regiis -i. This will do three things:
    1. Install the current version of ASP.NET on IIS
    2. Update MetaBase scriptmaps
    3. Upgrade old scriptmaps if they exist
  3. That’s it! If it still doesn’t work then…… *rolls eyes*

Technorati : , , ,
Del.icio.us : , , ,
Zooomr : , , ,
Flickr : , , ,

Back to Enterprise Programming

I am returning to the world of flashy GUI’s. After a few months venturing down the road of PHP/MySQL and occasionally Flash and Director, I have finally given in to the demands of the current. Or more like, the demands of the unknown force that is the nature. Or the people. Or whatever.

Not that I don’t like web programming to start with; it has its own quirks and funnies, and in the end I had become a lightning fast PHP programmer who can fix just about anything and even contributed some patches and plug-ins to the open source world!

But the appeal of the Enterprise market, as well as the current demands that the company employing me is experiencing, made me return to the world of strong-type programming. Personally I am happy that I’m switching around like this, as it keeps me in the loop as to where the world of programming is heading. But at the same time, I really wish I can focus on just one.

As to where exactly I’m headed next, I don’t really know. I’d love to start my own computer games studio, but as I have discovered the hard way, the local market just wasn’t ready for a game development studio. I could, of course, aim it towards online services, but the costs of developing such a game is still somewhat prohibitive (not to mention that I have to have an original idea…).

-

Those of you reading this on Blogspot, I invite you to drop by the all-new .Y, which has been renamed to “Coding by the Beach”, thanks to some of my friends back in Vancouver who suggested the name. Here’s the link: http://codingbythebeach.wiputra.com/

Technorati : ,
Del.icio.us : ,
Zooomr : ,
Flickr : ,

Making Money by… Making Email Addresses?

Have you ever wondered why some of your extended families, or even your immediate family member, have absolutely no idea even on how to log on to his/her email address? Or even getting the email address to start with.

I got a call at around my bed time (OK I admit I wasn’t exactly in bed at 10pm, but that’s not the point!) and to my big surprise, my dad actually asked me to get an email address for my beloved cousin! (And take a note: She’s turning 16 this year!)

I should get a job signing up emails. Easy money. Why did I even bother going to software engineering school? The education is expensive, and then you get treated like dirt at work. That’s valid both when you work for someone or at some company (and get asked to do overtime without pay), and self-employed (where clients treat you like dirt all the time… does the “Get me this feature or I won’t pay you the rest of your contract money” phrase ring the bell?).

Anyway, what should I do with these people? I honestly don’t think they should even spend any time on the Internet if they are not even willing to learn how to register a new email address. What do you think?

Technorati : , , ,
Del.icio.us : , , ,
Zooomr : , , ,
Flickr : , , ,

Copy Protected by Chetan's WP-CopyProtect.