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.

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 : , , ,

Connecting to Internet Using Ubuntu and Telkomsel Flash (Huawei E220)

If you use Huawei E220, Ubuntu 8.04 OS, and you want to connect to Telkomsel Flash in Indonesia, you can *almost* connect using the manual method that they provided to you on Ubuntu help here (the manual section):

https://help.ubuntu.com/community/DialupModemHowto/Huawei/E220

The auto-detection tool wvdialconf does detect the modem if you are using Ubuntu 8.04. However, when you enter “wvdial” it will fail as you will have no way to supply it with user name and password, because the Telkomsel Flash system does not use user name and password!

Fear not. Just enter anything in both fields (I use ‘telkomsel’ in both fields just for the heck of it, but anything should and will work just as fine). Then go on to dial using “wvdial” again. You should get connected now (and on the unlimited connection, it is much easier to use wvdial than Telkomsel’s dialer software on Windows. You don’t even need to press Enter repeatedly to retry connecting, if you can’t get in the first time. This is caused by wvdial not having any time-out feature as the Telkomsel Flash dialer does; it simply waits until it gets connected, even though the servers required for handshaking are not responding!)

P.S. Hmmm… this gets me thinking, why does it still work even though we’re not being authenticated (at least for the unlimited Telkomsel Flash package)? Because the handshaking is probably not used! Then why is the PAP/CHAP routine still embedded in the modem? We can probably get rid of the authentication setting on Windows in order to guarantee logging in EVERY TIME that “Connect” button is pressed. DISCLAIMER: This is just a theory, I haven’t verified it for fact yet. I’m just thinking out loud.

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

Calling for a Plant Search Engine Project!

My life is filled with plants. Back from the days of my freshman years, until the graduation and now working, I have been challenged to find the names of the plants.

I’m surprised to find out that there are still no search engines out there that can give me the name of a plant, given some characteristics of the plant. Google is of very little help when it comes to identifying plants; it does not have a taxonomy-based system (duh, it’s a general search tool!).


The local Callistemon, known internationally as The Bottle-Brush Flower Tree, photographed in Bedugul, Bali, Indonesia. It took me about 20 minutes of image browsing and more than half an hour in total just to learn the name of the plant!

Sometimes I have plant samples but really have no way to know what plant it is (other than asking people what it is, which is a less-than-acceptable solution to the problem!), so if I have this problem, I think some other people have at least had this kind of misery too!

If you make a quick search of “Identify Plant” in Google, you’ll find that most people are still identifying plants manually: ask the experts and hope they know the answer.

It is a grand idea to start a global-scale plant search engine project (there are tons of regional ones, but it’s often tough to find anything even remotely useful out of those sites). I have started formulating a plan that is based on taxonomy rather than simply searching plant characteristics, and allowing expert botanists to add plant items to the catalogue. But I need funding for this project. It is too large for me to handle alone. (OK, I admit, I am strapped for cash! The temptation to get back to the employment field and get a job is all too hot… I must resist…)


The well-known phrase “Will Code for Food”, made popular at around the dot-com bust period in 2001-2002

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

The Problem with Logins and Passwords

How many people in the world have one ‘magic phrase’ they use for their passwords?

I used to be one such person. Then I ran into KeePass a while ago and progressively changed my passwords to random letters, so, in case someone manages to get me drunk and/or wasted and gets me to tell him/her my magic phrase, I don’t get compromised so easily. Even when they manage to crack my magic phrase, they’ll still need the safe file to open my list of logins and passwords.

As a bonus, I can now remember each and every login and password that I have created.

KeePassS.jpg

But the downside, I now have to lug my USB stick around, and I have to have access to the computer that allows access to USB sticks whenever I try to log on to some website. Moreover, I have to download KeePass portable and store it in my USB so I can run it anywhere without downloading it again and again.

This gets me thinking. How do we authenticate ourselves on the web, but without having to store usernames and passwords? Eventually we will find a way to automate this, won’t we?

Then comes the usual argument: If a computer does our authentication for us, wouldn’t it be possible for it to actually impersonate us? What if a hacker compromises a given computer and we happen to authenticate on it?

I guess there really is no perfect way to authenticate ourselves on the net. Each new method will only switch among these methods:

  • What user has (security device, such as the USB stick that I have “modified” with added software)
  • What user knows (conventional passwords, not ones stored in KeePass)
  • What user is (fingerprints, for example)

The two-factor authentication article confirmed my thoughts.

So how do we authenticate ourselves in the future? Perhaps for now, single-factor authentication is enough. But if we go ahead and do the automation of passwords, yes we will not need to remember passwords, but we need to keep a security token of some kind, and we will probably need to scan our fingers too.

Imagine, though, if you need to do this EVERYTIME you do something routine, like transferring cash from a bank account to another (actually BCA (Wikipedia: http://id.wikipedia.org/wiki/Bank_Central_Asia) does this with their KeyBCA).

Perhaps this is the future of the currently developing OpenID. But it will likely only provide one out of the possible factors. This will probably be complemented with biometric fingerprint devices, once they become more ubiquitous.

In the meantime, I’ll stick to my KeePass software.

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

New Domain !

I have created three new subdomains out of my wiputra.com server. They are:

http://dot-y.wiputra.com
http://dot-u.wiputra.com
http://view-and-project.wiputra.com

At the moment, these links merely redirect to their blogspot.com counterparts. I am going to install a multi-blog engine and import the posts later.

Thank you for viewing.

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

Zephyr: A SaaS Test Management Tool from D Software

A representative from D Software has asked me to review their test management software product called Zephyr. Well, the memories of great days of testing software all came back in a rush. But let’s talk about that later.

Zephyr is a test management product developed on SaaS (Software as a Service) model. It has similarities with Visual Studio’s Team System modules. The most striking difference, of course, is rather than charging user with a ridiculous amount of money, they charge a monthly service fee per subscribed user. At $65 per user per month, it is a much better deal than getting Visual Studio Team Suite, particularly for teams who are geographically distributed, or teams preferring not to use Visual Studio.

I will, however, not recommend the tool for developers without reliable Internet connection. The tool crashed my Mozilla Firefox 3.0 when its Adobe Flex-based back-end tried to connect to the server during connection interruption.

-

They had said that the big-daddy of testing management is… guess what, Microsoft Excel! I can totally relate to that, as one of the junior software engineers who got fed up with having to update test cases for a staggering FIVE projects (yes, all were written in Excel). All the projects were all branched from one source code, so if I (or any other assigned defect tracker at that time) happen to find a bug, I will have to update the bug reports FIVE times, for FIVE different projects.

This led to confusion among us and had generated up to a dozen clashes a day on its worst days. The developers who felt they fixed the bug in their code kept complaining to me one of these:

  • “I know this WORKS on my project!”
  • “Hey, I’ve fixed that! Why does it still show on the list?”

So I said, “That’s enough!” and brought Mantis in. At that time, the manager took a long time to even start to approve using it, but the tool seemed like a one-stop solution for us the developers (and yes, we started using the tool long before the management approval… typical story, I guess?). The number of clashes were reduced dramatically, and we became that much more efficient in bug tracking. Apparently.

In reality, it only escalated the conflict further. The office did become quieter, but only because these conflicts have moved into a more hidden form. On each issue that Mantis generates, users can add notes and comments as they see fit. It is these notes that accumulated insults and bad words!

-

So I guess testing tools is only a small part of the equation in a successful collaborative environment. No matter how close or distributed the team is, and no matter what tool is used for development, it all comes back to one: individual developers’ attitudes and their ability to perform as part of the team. If the team members don’t have this attitude, then no matter how cool or powerful the UI of the testing platform is, it will never be of any use.

-

I have stopped posting on WordPress.com for now. Apparently Google excludes those sites that have copy contents. I only learnt a few days ago that this trick was used on early search engines to jack up the content ratings of the websites.

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

A Windows Programming Funny: GetTickCount

In my old office, a few times we tried to crash-test-run the application we were building, only to discover that it crashes every 49.7 days. The application, though were designed for portability, had been “poisoned” by one of our colleagues, so it had been full of Windows functions and we had no time to devise a fix for it.

“Nobody would run the application for 49.7 days anyway, right?” – we have been tempted to say. Unfortunately, some people (notably people who hibernate their Windows computers instead of shutting them down, like me, or Windows systems designed for public use or server purposes) do run their systems for more than 49.7 days.

Well, not that people would play Poker games at a location so public as a bus station ticket dispenser, but you never know, right?

-

This magic number, 49.7 days, came from the Windows GetTickCount() function. The function returns the number of milliseconds a computer has been running. Unfortunately, up to Windows XP this function returns a 32-bit integer. In 49.7 days, that 32-bit integer would have overflowed and many things can go wrong, if the application is not designed to take care of this behaviour. Unfortunately, some people don’t seem to be apt enough to read documents, since this behaviour is well-documented on MSDN.

So, according to Sue Loh in her blog (she’s a Windows CE (a “flavour” of Windows for mobile devices) developer), GetTickCount() is not always appropriate for use. Sadly, some developers don’t know this.

Check out this article:

http://www.techworld.com/opsys/news/index.cfm?NewsID=2275

The next time you use GetTickCount, you should ask yourself if the application is going to roll over 49.7 days. If so, use GetSystemTime or SystemTimeToFileTime instead.

In Vista, you can use GetTickCount64. Unfortunately if you use this function, your application will not run on the older Windows. Read here for explanation: http://en.wikipedia.org/wiki/GetTickCount#Avoiding_rollback_examples

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

Copy Protected by Chetan's WP-CopyProtect.