Sunday, June 22, 2008

The perils of HR

Every working adult and their cats would have a story about how much they dislike, nay, abhor, HR (and in some places, things are so bad that even HR folks have their own HR story to tell and I kid you not). So is it a wonder that someone actually writes “Why They Hate HR? [http://www.fastcompany.com/magazine/97/open_hr.html]”.

Just like everyone else I have my story to tell and I also have my own theory why HR just doesn't work. Mind you that this story is not my worst brush with HR, but it demonstrates, with simplicity, the abysmal state of HR.

This happens to me on one of my previous job. The story starts when my project team applied to go to this one training. You see, my team uses this software platform in our project. The platform (let us call it Platform X) is ubiquitously present all along the system we are developing. I.E. the GUI guys would be interacting with Platform X as much as the database guys or the middleware guys. Due to that, we all applied to go Platform X training and guess what, we got rejected because... wait for it... the policy says only one person from one project can go to a particular training.

Apparently, a few years ago (before I joined the company), a group of 5 employees from the same project applied to go to a 5 day training. Now instead of staying for the whole 5 days, each one of them would take turn to go to the training while the others enjoyed a 'paid vacation'. The HR director found out and decrees a law that 'hence forth, thy projects can only send one soul to training’. I guess, in some projects in makes sense, furthermore it does save the company a few cents on training expenses. But in my case (and I'm sure the same goes with many other projects) this law just doesn't make sense. If we send a GUI guy to the training, as much as he would like to understand how Platform X interact with our distributed multi agent based high performance cache system, I don't think he can. The same goes if we send a middleware guy, he would be clueless on how Platform X interact with the GUI stuff. Now to make matters worse, there was a change of requirement and we now need to include mobile devices components in our project and guess what? The mobile stuff are also ... going to interact with Platform X.

We wrote an appeal letter to HR saying that if we don't get this training, there's a high probability that the project will fail. The lady officer assigned to our case informed us that there's nothing she can do, apparently the decreed law has made its way into our HR system as a 'business rule' and it'll take a whole lot more than our collective pretty faces to change that. Sure we can make the appeal go all the way to the CEO but that'll take too much time and that is a luxury we didn't have.

All and all, due to the importance of the project, the client agreed to sponsor the training (with a huge reduction in fee and a large red line going through our Gantt chart cutting our timeline by almost half) and it was worth it. The training went well, we learnt a lot about Platform X but things could be better. Due to the reduction in fees, we had to let go of a few engineers (some of them are quite good) and due to the reduction in time, we need to rush like crazy. (In fact we were a bit off schedule in the end) What if HR would just swallow its pride and help let us go to that training we asked, Ok so what is some of our project team skip a day of the training... I'm sure that would actually cost less that what we have to 'pay' in the end.

And herein lies the problems with HR.

1) Business Process Over-Automation

How many times have you been to HR to complaint about something and they would simply dismiss you by saying 'it is already in the system, I can't do anything about it'. Well, if you're anything like me, that is almost the single most quoted excuse ever... OK, I lied, the single most quoted excuse is actually 'The manager's on leave' but 'it is the system' excuse must be one of the top 10 if anything.

I call this over-automation. Don't get me wrong, I'm all for automation but when the business rule goes something like: 'If the employee has been working less than 2 years and the project's duration is less than a year and the employee's mother is a keen supporter of Manchester United and the employee don't like sushi, then deny him any access to training'. You know that there's something wrong. Over automation is when rules 'hard coded’ into the HR system just doesn't make sense and yet it is religiously enforced because it's 'policy'. Now, over automation in itself is still OK, what makes things worse is over-automation plus paranoia. This brings us to the second problem.


2) Assuming the worst in your employee

How are HR business rules created? Simple, they just observe the employees, find the worst thing that they can do, assume everyone else will also be as bad and create rules against that.

Stupid HR rules is all about assuming that you are evil somehow, that you will abuse the system and you will run the company bankrupt with your lofty 'paid vacations' and 'non-cost-saving' attitude. Will there be abuses? Sure. Will the collective cost of failed projects and low morale make up to the cost of those abuses? I don't know; in fact, don't ask HR, they won't know either. And therein lies a problem. To concretely study each business rule in the system and find out its actual cost has never been attempted. In fact, everyone assumes that HR is omnipotent and will not make mistakes. Well, here's news for you HR does make mistakes, again and again.

Now what should HR do instead? Shouldn’t they have business rules? They should but HR officers should be given enough authority to make exceptions. In fact they should be encouraged to make exceptions because we are all different! We have different talents and different needs. Ned in accounting has a baby boy who suffers from thalassaemia. He should get more 'emergency leave' than Sue from engineering who is single. Consideration should be given on a case by case basis because HR stands for HUMAN resource and not HIGHLY AUTOMATED resource.

But how do you avoid abuses? Now since HR has this system in place, couldn't they measure how much a decision improves or not a project for example? You cannot improve what you cannot measure so HR should start making exceptions and start measuring if things are really abused or if it is just plain paranoia of some lonely HR manager still clinging tightly to his pillow, scared stiffed that the boogeyman is going to come out of the closet tonight.

Wednesday, May 21, 2008

World Congress On IT -- WCIT

I went o WCIT 2008 at KL Convention Center as a delegate and had to suffer a few days of "ye old boring diatribe and ego venting" almost all the way through the seminar. I mean, come on!, if you're an avid IT blog reader (and writer) and you read forums such as dzone, zdnet, theserverside, or even slashdot every single day, there is nothing new here. There are a few gems though, the "Future of the Internet" forum was really something else. The WCIT Great Debate (well, it's not much aof a debate since all the debaters agree with each other all the time) was also insightful. The final keynote by Vonton Cerf (the interplanetary internet googler) was also very interesting

My real beef is that most of the presentations touch only the surface of any particular issue and use up all the time given to retouch the same surface over and over again (and desperately hoping that the audiences would get some kind of an orgasm from this). I mean, there wasn't really a session where things are scrutinized to the nearest atom and problems are disected like dead frogs on some 15 year old science students lab table (and yeah those 15 year olds can really disect frogs). Even the CIO breakout sessions (well I attended the FIS session) didn't really go that deep.

Another dispointing thing is that, no technical session was done AT ALL. I mean, come on!. It's World Congress of Information Technology and no "technology related track was done. Couldn't they run a few tracks on some general tech issues. You know things like building next the generation of internet apps or whatever. But nothing at all, rien, nada.
Now before you jump your guns and say, "hey Azrul, this is a business seminar, get over it!" I would like to remind you that they have a PC Fair going on downstairs at the convention center. (Of course WCIT was co sponsored by PICOM whose hammer (read PC Fair) is applied to every single problem they have... What? earthquake in China? let's do a fundraiser... and throw in a PC Fair for good measure). Now, is PC Fair, full of pimple head bloggers wannabe drolling over some MP4 player, is more business related than "Tools and techniques to build the next generation of internet application"? Yeah... of course... NOT!

I was also a bit disappointed by the chief ministers trying to lure investors to their respective states. During their speeches, they were reading from a text... I mean, come on, reading?! Gosh! you guys are politicians for God sake. Use your public speaking skills (how on earth did you guys win the last election anyway?). Throw away the freaking text your secretary made the night before and speak from your heart. What can we expect from you. You track record. Your resources etc. If things are lacking what do you do to improve the situation, and last but not least... give us your phone number and email so that we can contact you. If I want to invest in a company, I want speak to the boss. Not some "account manager" you hired yesterday. The same goes with investing to a state.

Lastly, why the heck did they call WCIT as "the Olympics of IT" anyway? . Well, if the Olympics of IT consist mostly of sitting down, snorring, chatting and eating good food (and the food was good), should one wonder why IT workers are getting fatter?

Wednesday, April 23, 2008

To Mr. Jonathan Schwartz: Please make JavaFX work on plain CLDC

This entry is half an open-letter and half a rant-blog so if I run with it a bit too far, please bear with me.

Last year Sun introduces JavaFX as a rich multimedia platform for Java (Applet 2.0 ?) , at that time I was busy finding a way to run Flash animations on as many mobile phones as possible. Yes I know about Flashlite but the support of Flashlite are not that extensivise, especially if you include low end / old phones that only support MIDP 2.0. I was jumping up and down when they showed how rich multimedia app can actually run "unharmed" on a phone.

To my dismay, I found out later on that JavaFX only works on CDC (read high-end, almost PDA type phones) and totally ignore CLDC - Ok, that's not really true, they do plan cover CLDC (some time in the future?) but the CLDC phone's JVM must support SVG. (OK that's a whole bunch of acronymes but in short, JavaFX only supports the latest greatest phones).

To add salt to injury, I heard (ok this is only rumours - but it still hurts) that Sun is coming up with a design tool much like Abode Flash to help designers use JavaFX.

Now here's a news for Sun, designers don't use Java or JavaFX or any tool related to them. Designers are trained in schools to use Flash and AI and Photoshop. Heck, even Microsoft had a hard time dethroning Adobe as a design tool company. JavaFX only covers high-end newest-latest phones that already has Flashlite runtime: Why do I as a designer wants to create a JavaFX content when I can just run my swf (read flash) files unchanged on these latest phones?

So, here are a few things I think Sun should do instead:

1) Create a CLDC JavaFX runtime but do not insist on any extra JSR/MSA or whatever. Now how do I know that this is doable? Well because tons of rich multimedia games are already created on plain CLDC phones. Couldn't Sun just leverage the game APIs to create a JavaFX runtime? These APIs are already tried and true stuff and have been shown to be flexible enough to run the most complexe of games: let alone JavaFX content.

2) If Sun is itching to create a designer tool then please do so, but please please create an SWF to JavaFX translator. There are tons of Flash based content out there and IF this SWF to JavaFX tool comes along AND these content can run on any CLDC phone THEN JavaFX will make a killing.

Now, some might say, "hey Azrul, Sun is a server company, why the heck would they want to invest fulfilling your little wet dream". Let me answer that with a story of Sara. Sara is a designer living in Kuala Lumpur, Malaysia. She designs content for mobile phones. With the current technology, Sara could create around 4-5 contents per week (enough to pay her rent and to put food on the table). She uses Flash because that is the tool they taught her in designer school and Flash is flexible enough for her to create really cool stuff. But she has a huge problem: most phones does not support Flashlite. She saved some money and buy a software that converts Flash's swf files to 3gp files (mobile video) and send these 3gp files through MMS to her clients. Unfortunately, her MMS provider informed her that Telco's only supports MMS up to 100kb only. She knows about an alternative to MMS which is WAP push, but Sara allows her clients to include their own text in her content and MMS is the only way to do that right now. Because of this limitation on the size of the files, Sara needs to be extra careful on things like, the number of colors she uses and cool stuff like gradients are next to impossible to do.

Now, Mr. Schwartz, CEO of Sun, after reading a blog by some unknown guy, decided to make JavaFX runtime as standard compliant as possible (read independent of any optional JSR or MSA etc.) by leveraging MIDP's game API. Furthermore, Sun has also created an swf to JavaFX converter. Sara was thrilled when she found out that she can now create Flash content, convert it to JavaFx and run it on almost any phone out there. Her programmer boyfriend told her that JavaFX is based on JavaFX script (i.e. text based ) and therefore can be modified easily. He created for her a software to allow her clients to customise her content on the fly. She was very happy, now that customization can be done on the content itself, she doesn't need to use MMS anymore. Her MMS provider also supports WAP push and she can easily move from one delivery mechanism to another. As a bonus, WAP Push is inherently international. So now Sara can sell her content to Singapore, Philippines and the rest of the world.

What really makes Sara a happy girl is that she can now concentrate on being creative instead of having to count how many colors she is using in her content. Instead of creating 4-5 contents per week, she's now creating tens of them. She even hired a few interns to help her out. Together they create a few hundred contents per month.

One fine day she got a call from her server provider saying that her server just couldn't take the load anymore: too many people are downloading her content, then she remembers Mr. Schwartz's company, Sun Microsystem. They make powerful servers with gazilion of cores embedded inside. (Her programmer boyfriend, who is now her fiancee, just couldn't stop talking about how good those servers are). She call her server provider and ask them if they can use a Sun server instead. They inform her that Sun servers are a bit expensive but she has enough money now.

So Sara uses Sun server to serve her JavaFX mobile content and all thanks to Mr. Schwartz and all those nice people at Sun who made it all possible.

And Sara lives happily ever after...

So you see, making JavaFX work CLDC phones without any extra baggage and making swf to javafx transition to be as smooth as possible actually pays off... even for Sun Microsystems, the server company.

Thursday, April 17, 2008

Scenario Driven Testing

Cedric's recent (ok, it's not that recent) blog on ROR prompted me to write this entry. No, I'm not about to become a RORing ROR advocate, instead I'm going to talk about testing. An interesting point raised by CEdric was this: JUnit actually holds back Java testing scenario and therefore Java is stucked with unit testing as the ultimate and unquestionable master of test and anything less (or more) is frowned upon with so much prejudice it makes "think of the children" slogan sounds holy (dramatization is mine).

Ok, unit testing is in and on itself is not evil, but it's not enough. Functional testing, in my opinion is waaayy more important and yet functional test has been like that uncle everyone despises: can't live with him, can't throw him out of the boat while you pretend going fishing with him at 3:00 AM in the morning.

But how do you do functional test?

Here's my take on it:

When you start your software development you would have scenarii (of course unless you're doing Agi-hi-le development where you code as soon as the client opens his mouth -- just joking, I know agile folks have user stories :) ). The scenarios are not and can never be comprehensive but it gives you the ability to cover the usual usage of your software (which is probably 90% of the time - give or take). All you have to do now is to create scripts mimicking the scenarii and that's it.

Scenario driven testing coupled with unit test would be a great tool for developers: unit testing covers the nitty gritty part of your system and scenario driven testing covers the large picture.

Of course, most of the time you will need to do scenario driven testing through an interface so tools like httpunit would help. But what if you need (or forced) to use an interface toolkit that has no testing framework in sight? *cough* woodstock *cough* (BTW, if anyone knows a good interface based woosdtock testing tool, please show me the light) Well, apart from testing manually, I'm still working on a way to automate things a little. So stay tune...

Multiple Auto-complete for Woodstock (Netbeans Visaul Web Pack (VWP))

I have been searching around for multiple autocomplete but couldn't really find one that works seamlessly with Netbeans VWP. There is of course the work of Dimitry [http://blogs.sun.com/dmitry/entry/creating_autocomplete_entry_field_with] but this is limited to a single entry auto-complete (i need a multiple one). So just like any good hacker, I decided to see if I can improve Dimitry's code and come up with my own and le voila:

Basically, the flow of things are exactly like the one used by Dimitry, except that

1) When editing the textfield, not only that I refresh the listbox, but also see if the user is typing a comma, in which case, I will reset the filter in Page1. The filter will only contain words typed after the comma.



//in Page1 setFilter
int index = value.lastIndexOf(',');
if (index >= 0){
this.filter = value.substring(index+1);
}else{
this.filter = value;
}
listbox1DefaultOptions.filter(filter);



2) Also, the user could type the down arrow key while typing in the textfield, this will bring our focus to the listbox.

//in tf's OnKeyUp
var evtobj=event? event : window.event //distinguish between IE's explicit event object (window.event) and Firefox's implicit.
var unicode=evtobj.charCode ? evtobj.charCode : evtobj.keyCode

if (unicode==40){
document.getElementById('form1:listbox1').getSelectElement().focus();
}
document.getElementById('form1:listbox1').refresh('form1:tf');



Just to complete things, the user could also type a comma while browsing the listbox, this will be detected in the OnKeyUp event of the listbox

//OnKeyUp of listbox1
var evtobj=event? event : window.event
var unicode=evtobj.charCode ? evtobj.charCode : evtobj.keyCode
var character=String.fromCharCode(unicode)
if (unicode==44){
var text = document.getElementById('form1:tf').getProps('value').value + ',';
document.getElementById('form1:tf').setProps( {value: text } );
document.getElementById('form1:tf').getInputElement().focus();
}else{
var text = document.getElementById('form1:tf').getProps('value').value + character;
document.getElementById('form1:tf').setProps( {value: text } );
}


Of course if the listbox change, we need to append the listbox selecte entry to the textfield. (Note that We will replace any entry that is after the last comma.)

//OnChange event of listbox
var text = document.getElementById('form1:tf').getProps('value').value;
var index = text.lastIndexOf(',');
if (index >=0){
var stext = text.substring(0,index+1)+document.getElementById('form1:listbox1').getSelectedValue();
document.getElementById('form1:tf').setProps({value: stext});
}else{
var stext = document.getElementById('form1:listbox1').getSelectedValue();
document.getElementById('form1:tf').setProps({value: stext});
}


Please download the complete code here [http://www.mewit.net/codes/autocomplete.zip]

Multiple Auto-complete for Woodstock (Netbeans Visaul Web Pack (VWP))

I have been searching around for multiple autocomplete but couldn't really find one that works seamlessly with Netbeans VWP. There is of course the work of Dimitry [http://blogs.sun.com/dmitry/entry/creating_autocomplete_entry_field_with] but this is limited to a single entry auto-complete (i need a multiple one). So just like any good hacker, I decided to see if I can improve Dimitry's code and come up with my own and le voila:

Basically, the flow of things are exactly like the one used by Dimitry, except that

1) When editing the textfield, not only that I refresh the listbox, but also see if the user is typing a comma, in which case, I will reset the filter in Page1. The filter will only contain words typed after the comma.



//in Page1 setFilter
int index = value.lastIndexOf(',');
if (index >= 0){
this.filter = value.substring(index+1);
}else{
this.filter = value;
}
listbox1DefaultOptions.filter(filter);



2) Also, the user could type the down arrow key while typing in the textfield, this will bring our focus to the listbox.

//in tf's OnKeyUp
var evtobj=event? event : window.event //distinguish between IE's explicit event object (window.event) and Firefox's implicit.
var unicode=evtobj.charCode ? evtobj.charCode : evtobj.keyCode

if (unicode==40){
document.getElementById('form1:listbox1').getSelectElement().focus();
}
document.getElementById('form1:listbox1').refresh('form1:tf');



Just to complete things, the user could also type a comma while browsing the listbox, this will be detected in the OnKeyUp event of the listbox

//OnKeyUp of listbox1
var evtobj=event? event : window.event
var unicode=evtobj.charCode ? evtobj.charCode : evtobj.keyCode
var character=String.fromCharCode(unicode)
if (unicode==44){
var text = document.getElementById('form1:tf').getProps('value').value + ',';
document.getElementById('form1:tf').setProps( {value: text } );
document.getElementById('form1:tf').getInputElement().focus();
}else{
var text = document.getElementById('form1:tf').getProps('value').value + character;
document.getElementById('form1:tf').setProps( {value: text } );
}


Of course if the listbox change, we need to append the listbox selecte entry to the textfield. (Note that We will replace any entry that is after the last comma.)

//OnChange event of listbox
var text = document.getElementById('form1:tf').getProps('value').value;
var index = text.lastIndexOf(',');
if (index >=0){
var stext = text.substring(0,index+1)+document.getElementById('form1:listbox1').getSelectedValue();
document.getElementById('form1:tf').setProps({value: stext});
}else{
var stext = document.getElementById('form1:listbox1').getSelectedValue();
document.getElementById('form1:tf').setProps({value: stext});
}

Monday, April 14, 2008

Should MDeC be writing software

Now if you're a Malaysian, you probably heard of the MSC initiative launched by our previous PM to boost Malaysia into the information age. Well MDeC (formally known as MDC) is the (goverment linked) company tasked as being the steward of MSC. (www.mdec.com.my)

Being a steward of MSC is a blur job description. So MDeC does everything from managing real estates, managing gov. grants, making sure that IT talents are always available etc.

Should MDeC write software? Yes they should!

Ok, I know that all the business folks who make up MDeC's higher echelon is all eyeful and ready to grab their guns and shoot this idea to kingdom come... but please, hear me out.

Whay is Malaysian IT isn't taking off, despite what we do. Every single day, we have more and more Indian nationals working in Cyberjaya instead of the locals. Our IT graduates are not performing and lack way behind in either skills or theory. Our IT enterpreneur are afraid to speak out, our venture capitalist should just be called capitalist since most of them are even worse than banks, our IT shops, diligent and hardworking as they are, have to resort to selling computers since no one is helping them to create and monetize their IPs. We are the third outsourcing destination after India and China and yet we do nothing to at least maintain that or, God forbid, improve our ranking.

I'm matured enough and knowledgable enough to understand that not all these problems are MDeC's fault. The problem is that MDeC is, intentinally or not, blissfully unaware of these problems. Ok, that is not entirely true. A lot of people in MDeC are aware of these problems but the processes put in place to solve these problems are so out of touch with the reality of things its not even funny anymore.

I'm not about to hang MDeC by the neck without offering some way to improve things. How to improve?, why, MDeC should create its own software and "suffer" like we suffer, experience the pain that we experience at every tick of the clock. Now don't just write software, market it, find investors for it, find clients to back it up etc. And MDeC will surely know where to put the dollars of their next budget to.

Now before we dismiss the possibility of this, do know that MDeC is already creating creative contents (www.saladin.tv) and I guess that is why support for creative contents are quite extensive because they did go through the pain of actually creating something. But do know that a lot of MSC companies create software too (heck, by my account, there are a lot more software shops compared to creative content shops).

To MDeC, unless you experience things that we, the Malaysian software industry, had to go through, you will never truely understand the pain. No matter how many dialogs you run, no matter how many face to face, heart to heart meetings you have with the local software shops, experience is and will always be the best teacher.