<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Vikram Goyal&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/" />
<modified>2007-07-12T00:53:59Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/gvix/247</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2007, gvix</copyright>
<entry>
<title>Why Nokia Why?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2007/07/why_nokia_why.html" />
<modified>2007-07-12T00:53:59Z</modified>
<issued>2007-07-12T00:53:51Z</issued>
<id>tag:weblogs.java.net,2007:/blog/gvix/247.7832</id>
<created>2007-07-12T00:53:51Z</created>
<summary type="text/plain">Nokia N95&apos;s GPS leaves me disappointed and disgruntled.</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>Community: Mobile &amp; Embedded</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>For a few years, I had a crappy mobile phone. I used it for what I thought was the primary function of owning a phone. You know, make and receive calls. For this purpose, the phone I had was quite satisfactory.</p>

<p>I had an ulterior motive as well for not wanting a new phone. I was waiting for multiple devices to converge and converge successfully into one device that would combine the power of a digital camera, a GPS and a phone, besides the other odds and ends. It seemed that the <a href="http://www.nseries.com/products/n95/index.html#l=products,n95">Nokia N95</a> was finally the answer. It promised all of that and more.</p>

<p>So I went ahead and bought it. Yes, it hurt my hip pocket a little. But hey, I am allowed to treat myself now and then!</p>

<p>The phone - works great! The camera - fantastic. 5 MP captures all my blemishes in great detail. The GPS - Morbidly unjustified piece of crap.</p>

<p>Yes, strong words. Strong words indeed. It's my frustration with using the GPS that has made me so disgruntled and annoyed with the powers that be at Nokia. What could have been the <a href="http://en.wikipedia.org/wiki/Pi%C3%A8ce_de_r%C3%A9sistance">Pièce de résistance</a> of this phone is a blemish of the highest order.</p>

<p>Ok, the GPS part of the application works fine (or used to work fine, as you will see later). So if I want to see what my current latitude and longitude is, the phone will tell me pronto (after locking onto satellites). But Nokia, why would any normal phone buyer want to just know their latitude and longitude? The killer application part of the GPS module would have been navigation with voice guidance. So can I do that with your phone? Maybe. More importantly, can I do that out of the box? NO!</p>

<p>Out of the box, the Nokia navigation is totally useless. It takes the skills of a hacker and <a href="http://forums.whirlpool.net.au/forum-replies-archive.cfm/701948.html">internet trawler</a> to know how to install navigation with voice guidance into your phone.</p>

<p>So here is my question. Why has Nokia missed the boat here? Why did they supply the basics and not make it a complete package by making the GPS a truly usable function. If I, with some computer skills, had so much trouble, I can't ever see a normal person bothering with using the GPS. Ergo, I can't see a normal person buying the phone because it contains GPS. Why would you when you have other phones that match it in its capabilities? Why wouldn't you just buy a dedicated navigation unit, that works out of the box?</p>

<p>It's a travesty of usability. The navigation should have worked out of the box. I shouldn't have to second guess the device. Don't make me think. Otherwise, take the GPS out. It's not selling your phone. </p>

<p>And this makes me criticize the general phone manufacturing industry on the whole. So blinded are they by the pursuit of easy money, that they forget to do the basics right. Yes, by purchasing voice navigation the phone manufacturer got me to shell out money for a value added service (on top of an exorbitantly priced phone), but they would have had better marketing karma if the only usable component of GPS (navigation) just worked. Instead, I now have a phone that does the same thing as my $800 cheaper old phone did. I know I am the sucker here, and that makes me mad.</p>

<p>PS 1: Once I did get the MAPS application to work, it worked well for all of half hour! After that, the application just plainly refused to load. Now I can't even get my latitude and longitude. Sigh! Can anyone  help?</p>

<p>PS 2: Don't get me started on the manual that comes with the phone. So out of date it is with what's actually on the phone, that I threw it out after my first attempt at getting the navigation to work. Menus are not where they should be as per the manual, there is no knowledge of what's actually on the device and the whole thing feels like an afterthought. Why bother with a manual Nokia?</p>

<p>PS 3: There is something to be said about the purchasing module for the navigation part. It worked so smoothly, that it was the only redeeming feature of the whole process, even though I was disgruntled at having to pay for it. But that was the ONLY part that worked well. Yes, Nokia, make the part that takes my money well. The rest can take care of itself right?</p>]]>

</content>
</entry>
<entry>
<title>Is outsourcing to India still financially relevant?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2007/04/is_outsourcing.html" />
<modified>2007-04-10T05:42:54Z</modified>
<issued>2007-04-10T05:42:47Z</issued>
<id>tag:weblogs.java.net,2007:/blog/gvix/247.7019</id>
<created>2007-04-10T05:42:47Z</created>
<summary type="text/plain">Have the rising wages in India made outsourcing financially irrelevant? </summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>I had an interesting phone chat with a friend based in Bangalore, India using Skype (I am based in Australia). While not going into specifics, he outlined his take home pay and as he was saying it, it hit me like a thunderbolt. </p>

<p>His take home pay was only 10% less than my take home pay. <em>In actual dollar terms.</em> So, for example, if my pay was $50000, he was getting $45000 in Indian Rupees. That means, if you factor in the actual living costs, he was earning more than I was by a magnitude of at least 25 to 30% for same programming roles and equivalent experience. (And his is not an isolated example).</p>

<p>Various feelings and thoughts went through my head, many of them unprintable (Yes, I was green with envy, but he is a friend, so I gotta be happy for him :) ). After a couple of hours, when logical thought process returned, I thought about how the cost of rising wages was likely to impact the whole process of outsourcing.</p>

<p>I contacted a friend of mine in the IT department of a banking giant in Sydney to get his perspective. After a bit of cajoling, he revealed that a recent outsourcing round had saved them nearly 25% of their total IT budget. </p>

<p>Of course, this is speculative saving. The actual savings won't be realized till the project has finished (2 or 3 years). In which time, the actual savings would be in the ballpark of 15% (increased costs, infrastructural issues, missed requirement, inflation .. whatever).</p>

<p>Now, 15% of $10 million (a not so inaccurate value) is still $1.5 million. No small change and any CEO/CIO would be happy to show that as his/her legacy (especially if it ends up as a bonus for him/her :)). But to save $1.5 million over 2-3 years and have your whole business processing outsourced seems excessive. Or does it?</p>

<p>I know there are no correct answers here and this example is too simple to attempt a values based judgment. I am scratching my head as I am writing this in trying to find a logical explanation for this. How is outsourcing still financially viable? Or how can it continue to be viable for both the Indian outsourcing industry and the Western IT departments? Any answers from both sides are most welcome!<br />
</p>]]>

</content>
</entry>
<entry>
<title>Motorola to develop Java ME stack under Apache</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/11/motorola_to_dev.html" />
<modified>2006-11-07T22:42:44Z</modified>
<issued>2006-11-06T02:33:51Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.5871</id>
<created>2006-11-06T02:33:51Z</created>
<summary type="text/plain">In news that is sure to drive further the fragmentation issues of development using Java ME, Motorola has announced that it is going to develop its version of Java ME under the Apache license. As the report says: &quot;it&apos;s not...</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>J2ME</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>In news that is sure to drive <strong>further</strong> the fragmentation issues of development using Java ME, Motorola has announced that it is going to develop its version of <a href="http://news.zdnet.com/2100-3513_22-6131788.html">Java ME under the Apache license</a>. As the report says:  "it's not clear whether the Motorola and Sun projects are complementary or competing". I can't understand if Motorola is legally authorized to create a product called Java ME when Sun is the legal owner, even though it is being open sourced? Can anybody clarify this?</p>

<p>The timing is absolutely wrong and the aim seems foggy. Sun has just open sourced Java ME, so why develop a conflicting product, even under the ambit of Apache? The stated aim is to reduce device fragmentation. Ha! By developing a different base API to Sun's Java ME? How will that work? Not only will developers have to content with the established device fragmentation issues, this will introduce another layer of complexity and API fragmentation. Have you tested on Sun's Java ME based devices? Have you tested on Apache Java ME based devices?</p>

<p>The truth seems to be a marketing push to garner respectability within the Java ME development community to push Motorola and create a Motorola-centric development ecosystem.<br />
<em><br />
"Although we are not aware of Sun's open-source plans, we would hope Sun would join in this effort," said Mark VandenBrink, a senior director and chief platform architect in Motorola Mobile Devices business.</em></p>

<p>Huh? Who, within the community, is not aware of Sun's open-source plans?</p>]]>

</content>
</entry>
<entry>
<title>Why are Sun&apos;s code examples such bad examples of coding?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/10/why_are_suns_co.html" />
<modified>2006-10-11T11:38:27Z</modified>
<issued>2006-10-11T11:38:08Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.5711</id>
<created>2006-10-11T11:38:08Z</created>
<summary type="text/plain">There is no quality control applied to Sun&apos;s code examples</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>J2ME</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>I was browsing through the Sun supplied Location API examples in the latest Wireless Toolkit when I came upon this:</p>

<p><img alt="code1.jpg" src="http://weblogs.java.net/blog/gvix/code1.jpg" width="780" height="236" /></p>

<p>Ok, so it's just a few lines of code that are, to put it mildly, exceeding the generally accepted 80 character limit. The fact that there is no explanation of what this class actually does in the Javadoc comments is to be expecting too much. Hey, it's the 'Main CityGuide MIDlet'. What more explanation do you want?</p>

<p>So, I decided to investigate further. At random, I picked another code example, the BallCanvas class in AudioDemo. Just a small snippet from this:</p>

<p><img alt="code2.jpg" src="http://weblogs.java.net/blog/gvix/archive/code2.jpg" width="474" height="512" /></p>

<p>The formatting is all over the place, the commenting is, as you can see in the highlighted section, verbose (Destroy for the method called destroy()!).</p>

<p>OK, so these are just two examples, but when you look at the rest of the code examples, two things stick out.</p>

<p>1. Code comments were not a priority of the engineers writing the code samples for Java ME. There is no consistency.</p>

<p>2. Code formatting is all over the place. There is no adherence to any established guidelines or any semblance of quality control.</p>

<p>Why does Sun think it is ok that these code samples be released without mandating that a due QC be applied to them? Is this the same for examples of Java EE and Java SE? I know these are just code samples and Sun is doing us a favor by releasing them, but it shouldn't take me the better part of a day trying to gloss over badly formatted and incompletely commented code for a technology that Sun is trying to sell.</p>

<p>When you are trying to learn a new facet of Java ME technology based on these code samples, it would help if you have spent your years doing code reviews for undergraduates.</p>]]>

</content>
</entry>
<entry>
<title>Another failed interview</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/09/another_failed.html" />
<modified>2006-09-15T07:09:16Z</modified>
<issued>2006-09-15T07:09:02Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.5564</id>
<created>2006-09-15T07:09:02Z</created>
<summary type="text/plain">Another day, another failed interview</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p><em>Disclaimer: <strong>UNLIKE</strong> my <a href="http://today.java.net/pub/a/today/2004/05/04/interview.html">previous article on interviewing</a>, I am not criticizing any company, processes or interviewers. This post is <strong>JUST</strong> a blog entry and documents my inability to clear a technical interview. If anything, the interviewees this time around were professional, courteous and knew what they were doing. My one and only gripe is with their huge development area, which resembled a sweatshop with rows upon rows of developers hacking away like code monkeys, sometimes 2 to one machine, and that is not a good view for new recruits (not just my opinion).</em></p>

<p>The sudden onset of the 1:55 local going from Roma Street to Ipswich woke me up from my day dream. The train was coming in to stop at the Milton station. I looked up at the gentle blur of a fast moving train and between the cracks of the bogie's, I could just about see the outline of the Milton brewery and the <a href="http://www.xxxx.com.au">smiling Fourex man</a> with the very inviting beer in his hand.</p>

<p>For the 10th time in as many minutes, I wondered what I was doing here. Sitting in a car park, early for an interview, I was trying to pass the time by convincing myself that this was a good thing. The palpitations in my heart were making coherent thought impossible. What seemed like a good idea a week before, now seemed like a monumental blunder.</p>

<p>I was <a href="http://www.wotif.com/ContactUs.jsp">'here'</a> to be interviewed for the position of a J2EE developer. While that in itself is enough to send shudders down my spine, the fact that I was going to be interviewed for a J2EE developer after working for more than 2 years on ASP.NET was making me hyperventilate. I am not good with interviews. Perhaps it has something to do with the disaster I had some time back with <a href="http://today.java.net/pub/a/today/2004/05/04/interview.html">this</a>. Since that event in my life, I have failed 4 interviews, including the one that I am here for. But I get ahead of myself.</p>

<p>Not content with difficulties of going for an interview after 2+ years for a technology I haven't touched in as many years, I had made it even worse by agreeing to be interviewed for a place that follows radically different programming practices. I have written about <a href="http://weblogs.java.net/blog/gvix/archive/2005/10/off_the_xp_band.html">not liking XP</a>, but the place that I was going for was an XP house, out and out. </p>

<p>All in all, this seems like a perfect case to use to brand me a sucker for punishment. Out of touch with J2EE, impossible to give a good interview, and hate the development methodology. Why did I bother?</p>

<p>2+ years ago, I had left J2EE to go ASP.NET to learn what ASP.NET had to offer. I wanted to expand my horizons, to learn about the competition. I wanted to see how and why ASP.NET may do things better than J2EE. Now, I do understand how these two technologies differ, and how one may be better suited for a particular job.</p>

<p>I wanted to try the same thing with XP after working in traditional methodologies all my life. To see what the competition had to offer. I had tried XP on my own and had ended up disliking it. My thought was to give it a shot for a couple of years and than reach an informed opinion.</p>

<p>Of course, I ended up giving a horrible interview. Combination of nerves, inability to think on the spot and the wondrous and unique ability of fluffing up simple explanations made for an excruciatingly difficult interview. Add to that the fact that the guy I had pulled up in my <a href="http://today.java.net/pub/a/today/2004/05/04/interview.html">previous interview disaster</a> now works for this company and had asked if I now knew the answer to the classic ('So you don't know what a static inner class is?') question. At that point I knew I had no chance. Of course I still don't know the answer to this question, but I guess I could simply <a href="http://www.javaworld.com/javaworld/javatips/jw-javatip106.html">look it up</a>. </p>

<p>Which brings me to ponder on my next steps. Not getting through the interview wasn't a disaster. I already have a secure job and good working environment. I have even started on a new J2EE project. But not clearing interviews is starting to bother me now. Failing four interviews in 3 years is not a complete disaster, and I am not even counting the first one because it was <a href="http://today.java.net/pub/a/today/2004/05/04/interview.html">inherently flawed</a>. But it has been since that interview that I haven't cleared any more and that is a cause for concern. Going public with this admission may be a bad idea and self-deprecating, but I hope to learn how to get over this fear of being interviewed. </p>

<p>Now if you will excuse me, <a href="http://www.xxxx.com.au">the fourex man</a> has been holding on to my cold beer for a very long time now.</p>]]>

</content>
</entry>
<entry>
<title>Open source Java ME</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/08/open_source_jav.html" />
<modified>2006-08-29T12:21:23Z</modified>
<issued>2006-08-29T06:16:46Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.5446</id>
<created>2006-08-29T06:16:46Z</created>
<summary type="text/plain">A comment on Sun&apos;s decision to open source Java ME</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>J2ME</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>One of the benefits of Sun's decision to <a href="https://jdk.dev.java.net/news-08-14-06.html">open source Java ME</a> (along with the rest of the Java brand, but I am concentrating on Java ME), especially for an author and writer, is the ability to peek inside the code to understand what's going on. This provides a deeper understanding of the source code, and ultimately, a better communication to the readers than learning from the API.</p>

<p>Of course, in that regard, open sourcing Java ME has no benefit. The source code for Sun's implementation of the complete Java ME API stack has been available for a long time now via the Sun Community Source Licensing. Check it out <a href="http://www.sun.com/software/communitysource/j2me/">here</a>. The community source licensing is very similar to what the goals of open sourcing it would be. Of course there are differences, and I am no lawyer, so make your own judgements by looking at the community source licensing page <a href="http://www.sun.com/software/communitysource/">here</a>. It even allows you to modify the source code and contribute the changes back for 'the benefit of the community' <a href="http://www.sun.com/software/communitysource/faq.xml#q8">without getting paid</a>. Sounds very much like open source to me :). </p>]]>

</content>
</entry>
<entry>
<title>MMAPI 1.2 released</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/07/mmapi_12_releas.html" />
<modified>2006-07-04T03:17:27Z</modified>
<issued>2006-07-04T03:17:18Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.5146</id>
<created>2006-07-04T03:17:18Z</created>
<summary type="text/plain">This is a maintenance release with few real changes</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>J2ME</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>JCP has quietly released the <a href="http://jcp.org/en/jsr/detail?id=135">1.2 API specification for MMAPI</a> (JSR 135). This is only a maintenance release and contains mainly documentation changes in the API. The change log is <a href="http://jcp.org/aboutJava/communityprocess/maintenance/jsr135/MMAPI_change_log.html">here</a>.</p>

<p>Note that the change log notes that the changes are accepted for 1.1 release, when in reality, it should be 1.2 release. I guess that there will be another release to fix that!</p>]]>

</content>
</entry>
<entry>
<title>Sadly, I am not a mock Sun employee</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/06/sadly_i_am_not.html" />
<modified>2006-06-30T10:42:30Z</modified>
<issued>2006-06-30T10:42:17Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.5129</id>
<created>2006-06-30T10:42:17Z</created>
<summary type="text/plain">In fact, last time I checked, I wasn&apos;t a &apos;mock&apos; anything. I get &apos;mocked&apos; a lot for my photograph above, but that&apos;s the maximum &apos;mocking&apos; in my life sadly. So why does Javablogs.com classify me as a mock Sun employee?...</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>In fact, last time I checked, I wasn't a 'mock' anything. I get 'mocked' a lot for my photograph above, but that's the maximum 'mocking' in my life sadly.</p>

<p>So why does <a href="http://www.javablogs.com/ViewEntry.action?id=276079">Javablogs.com</a> classify me as a mock Sun employee?</p>

<p>If Sun would like to offer me a position, I will be more than happy to call myself a mock Sun employee. Or whatever. But then I wouldn't be 'mock' anymore so that may defeat the purpose. How about Sun employee emeritus? Or Distinguished Sun fellow?</p>

<p>On second thoughts, Vikram Goyal may be fine too. I am still open to a position with Sun though.</p>]]>

</content>
</entry>
<entry>
<title>Did you ask the users before implementing AJAX?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/06/did_you_ask_the.html" />
<modified>2006-06-28T01:05:20Z</modified>
<issued>2006-06-28T01:05:01Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.5104</id>
<created>2006-06-28T01:05:01Z</created>
<summary type="text/plain">How good ideas go bad.</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>If you have read my previous entry on a 30 second guide to <a href="http://weblogs.java.net/blog/gvix/archive/2006/06/your_30_second.html">using AJAX</a>, you know that it was a surprise to me that implementing AJAX is so simple (There were other lessons in that entry too, about how much hype driven AJAX really is and why there is a whole market for AJAX that should really be the DHTML and Javascript market, but hey, I am not the complaining kind). </p>

<p>So, would it come as a surprise to you that my good intention of using AJAX<em>ish</em> behavior on an existing web application turned into a nightmare of gargantuan proportions, and it had nothing to do with knowing <em><strong>how</strong></em> to use AJAX?</p>

<p>It had all to do with knowing <em><strong>when</strong></em> to use AJAX.</p>

<p>To keep this entry simple, suffice to say, that I decided to implement a <a href="http://www.google.com/webhp?complete=1&hl=en">Google Suggest</a> like capability for a search field in the said web application. I was happy with the result and so was my manager and we decided to show this to the users.</p>

<p>They hated it.</p>

<p>Not just hated it, but showed a varying range of emotions including paranoia, skepticism and general hatred towards the programming geeks (OK just kidding). Sample some of the responses (You need to know Google Suggest to understand these responses):</p>

<p>1. Why is this page not refreshing?</p>

<p>2. What is this drop down and why doesn't it go away?</p>

<p>3. Where is my result?</p>

<p>4. How do I select my result?</p>

<p>5. Why is this thing preselecting a partial result?</p>

<p>6. Aren't we paying you too much?</p>

<p>7. This coffee you served smells weird.</p>

<p>(They didn't actually say the last two, but I swear they meant to).</p>

<p>So, lesson learned. </p>

<p>Users are used to a certain way the web works. They expect a page refresh. Unless the whole web changes to resemble AJAX<em>ish</em> behavior, they won't like this mixing and matching. Confusion will reign. <em>Do I wait for the page to refresh or will this text box magically open up?</em> <em>Do I click this button or do I let it be clicked for me?</em> In short, user experience will suffer.</p>

<p>I am not bad mouthing AJAX. It's a cool new slant at a new web (using, I emphasize, existing technology). But that's it. It's a cool new programming technology for the programming types. Unless the actual users initiate the need for change, or the users are involved from the start and shown the possibilities and accept the changes, use  AJAX in moderation. Take one bitter pill a day.</p>]]>

</content>
</entry>
<entry>
<title>Your 30 second guide to AJAX</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/06/your_30_second.html" />
<modified>2006-06-28T00:31:55Z</modified>
<issued>2006-06-20T04:54:56Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.5056</id>
<created>2006-06-20T04:54:56Z</created>
<summary type="text/plain">or why most of whatever you need to know about AJAX you probably already know.</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>Chances are, if you have been building web applications for a little over a year and have used javascript even a little bit, you already know how to build AJAX applications. To use AJAX, you need to know the properties and methods of a Javascript object called XMLHttpRequest. All recent browsers support this object, but of course, as with other cross browser issues, it is instantiated differently in IE and others. The following creates this object across all browsers.</p>

<p><code><br />
var xmlHttp;<br />
function createXMLHttpRequest() {<br />
&nbsp;&nbsp;if(window.ActiveXObject) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");<br />
&nbsp;&nbsp;} else if(window.XMLHttpRequest) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;xmlHttp = new XMLHttpRequest();<br />
&nbsp;&nbsp;}<br />
}</code></p>

<p>Now, having obtained an instance of this object, you can use it like any other Javascript object. Of course, the nice thing about it is that it can make HTTP requests to a back end process independent of the containing document or browser requests.</p>

<p>So the steps are:</p>

<p>1. Create this object.</p>

<p>2. Tell this object which method will handle response from the server.</p>

<p>// handleServerResponse is a method in your javascript code.<br />
xmlHttp.onreadystatechange = handleServerResponse; </p>

<p>3. Make your request:</p>

<p>xmlHttp.open("GET", "YOUR URL"); // can use POST or PUT as well</p>

<p>4. Send your request:</p>

<p>// the parameter to this method can be an optional request parameter<br />
xmlHttp.send(null); </p>

<p>5. Handle the response from the server in the method that you designated earlier.</p>

<p><code><br />
function handleServerResponse() {</p>

<p>&nbsp;&nbsp;if(xmlHttp.readyState == 4) { // the state when the request has completed<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (xmlHttp.status == 200) { // the HTTP status code returned from the server<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var server_response = xmlHttp.responseText; // the servers response, use this with DHTML to modify current page<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;}<br />
}</code><br />
	<br />
Everything else that you hear about AJAX, trust me, is just clever Javascript that is used to manipulate the DOM of the current document based on this asynchronous request to the server. Your server side code is not affected (unless you are coding specifically for AJAX).</p>

<p>There are other methods and properties of the XMLHttpRequest object and these can be looked up <a href="http://en.wikipedia.org/wiki/XMLHttpRequest#Methods">here</a>.</p>

<p>I couldn't believe how simple it really was. The hype around this technology is mostly to do with AJAX patterns and clever stuff that is done using asynchronous requests and manipulating the browsers DOM on the fly. So if you know how to manipulate the DOM using Javascript, you now know how to manipulate the DOM without needing to make the whole page refresh.</p>]]>

</content>
</entry>
<entry>
<title>Java frameworks - maybe too many</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/05/java_frameworks.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-05-10T05:42:28Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.4682</id>
<created>2006-05-10T05:42:28Z</created>
<summary type="text/plain">Are there too many Java frameworks? Or is Struts still the king?</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>A recent discussion on the Queensland JUG mailing list here in Australia, has echoed some of my thoughts on Java frameworks. Before I point you towards this list and the messages in it, let me confess something.</p>

<p><em>I have never used Hibernate commercially.</em></p>

<p>There. With that career ending publicly stated confession, let me take a bow and get out of the way to contemplate a career change to opening my own curry restaurant (Ah, at least I would be able to eat my own creations).</p>

<p>For that matter, I haven't actually ever used Spring. Or Tapestry. Or Velocity. Webwork? No. I do have books on Hibernate, Spring and Tapestry.</p>

<p>While I am in this self-destruct mood, let me add. The last framework that I actually used and can tell you everything about in a heartbeat is Struts, version 1.1. I have only recently used Struts 1.2, and would be clueless if you asked me anything about the new <a href="http://struts.apache.org/struts-shale/index.html">Struts Shale Framework</a>, based on Java Server Faces.</p>

<p>For me, the requirement to use anything over that framework didn't arise (the fact that my day job requires me to work partially with ASP.NET may have something to do with it as well). Unlearning a solid, reliable framework that did everything that you asked of it, just didn't seem right. There is not a single case I could make against using Struts (1.1 and 1.2) in production environments.</p>

<p>So, back to the list. <a href="http://blogs.ittoolbox.com/eai/development/">Paul Reedman</a>, responding to an article on a <a href="http://australianit.news.com.au/articles/0,7204,18994350%5E15306%5E%5Enbv%5E,00.html">failed Java project</a> in West Australia, hit the nail on the head by <a href="http://lists.ajug.org.au/pipermail/ajug-qld/2006-May/001163.html">saying</a>:</p>

<p>"<em>Java Frameworks good grief what a joke, take your pick we have a million of them. Everyday on Server Side I read about a NEW, FANTASTIC, LABOUR saving framework. </p>

<p>I still run into Java projects that build their own frameworks !!! Yes Struts or hibernate is not good enough, we need our own framework, so lets spend precious several weeks (or months) of the project time recasting a new web framework."</em></p>

<p>He goes on to add:</p>

<p><em>"Another thing I have noticed is that Java people love building layers. So a particular developer doesn't like the interface into hibernate or struts (or whatever framework) so they build another layer on top of the framework.</p>

<p>This layer then becomes complicated and so a whole bunch of other people add to the layer in an attempt to make it "easier". (which doesn't happen because all they have done is to make it more complicated). Of course this new layer hides everything and soon you have no idea what you are doing. Importantly no one documents this new layer, so when new people join the project, they ask "I don't understand this framework..". Of course they don't know that underneath all of this software is plain old struts which has disappeared from view."</em></p>

<p>How true. <strong>Plain old Struts</strong>. Even though I have a propensity to add multiple layers to my Struts projects, I love the fact that Struts is the glue holding them together in a working whole. There was a never a requirement weird enough that made me think, "Hmm. Maybe Struts can't do that, better look at other frameworks". </p>

<p>Or maybe, I am holding on to the past without thinking about the future. Would I still be using Struts (ok maybe 1.2 instead of 1.1) 5 years from now? 10 years? </p>

<p>Or would I be giving away free rice with your curry?</p>

<p><br />
</p>]]>

</content>
</entry>
<entry>
<title>Pro Mobile Media API Book released</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/05/pro_mobile_medi.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-05-02T12:25:59Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.4622</id>
<created>2006-05-02T12:25:59Z</created>
<summary type="text/plain">First book devoted to MMAPI has been released - learn to add audio/video/tones/MIDI to your Java enabled phones.</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>J2ME</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p><strong>Update 10th May 2006</strong>: Sorry! All free copies are gone. If you need it, please consider buying the book.</p>

<p>In keeping with complete compliance with the java.net weblog policies, may I introduce you in a selfless way to my book on Mobile Media API, recently released by Apress.</p>

<p>Mobile Media API, as you may know, allows you to add multimedia capabilities to your Java enabled device (For an introduction to this API, please read a tutorial at java.net by, ahem, me, here: http://today.java.net/pub/a/today/2005/09/27/j2me4.html). The book covers this API in exhaustive detail and shows you how to add audio and video, generate tones, play with MIDI, capture audio and video streams and so on.</p>

<p>You can buy the book at Amazon <a href="http://www.amazon.com/gp/product/1590596390/ref=sr_11_1/002-8185983-9544830?%5Fencoding=UTF8">here</a>, or get to the book's website at Apress <a href="http://www.apress.com/book/bookDisplay.html?bID=10101">here</a>. The Apress site also has a sample chapter on <a href="http://www.apress.com/book/supplementDownload.html?bID=10101&sID=3483">Media Player Lifecycle and Events</a>. Finally, the book's companion site is <a href="http://www.mmapibook.com">here</a>, where I run a case study on audio/video/text blogging from your mobile phone using MMAPI.</p>

<p>I also plan to giveaway two copies of the book to the first two people who promise to write a review on Amazon afterwards. Please email and convince me of your commitment at vikram@mmapibook.com!</p>

<p>Comments, feedback etc. also welcome at vikram@mmapibook.com.</p>]]>

</content>
</entry>
<entry>
<title>FTPOnline special report on Java ME</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/04/ftponline_speci.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-04-22T09:40:25Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.4560</id>
<created>2006-04-22T09:40:25Z</created>
<summary type="text/plain">FTPOnline has a few articles on Java ME development</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>J2ME</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>FTPOnline has published a <a href="http://www.ftponline.com/special/mobilejava/">series of articles on Java ME development</a>. There are some good articles here, especially if you want to sell Java ME to your boss or in your enterprise. Martin de Jode's article on <a href="http://www.ftponline.com/special/mobilejava/mdejode/">Efficient MIDP for Symbian-Based Devices</a> is well written and contains good tips, although I couldn't figure out why the same tips won't apply to non-Symbian devices (On that note, most tips would apply to <em>any</em> Java development). Michael Yuan's article on Java ME is an introduction to newbies from a non-technical perspective and is a good but predictable read. <br />
Nokia is strongly featured with two articles on developing across the Nokia platform, first with the <a href="http://www.ftponline.com/special/mobilejava/lepting/">enhancements to Forum Nokia</a>, and second, with <a href="http://www.ftponline.com/special/mobilejava/ahaynes/">advancing Java on Series 40</a>, which covers some of the useful series 40 API's.</p>]]>

</content>
</entry>
<entry>
<title>Managing estimation failures</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/04/managing_estima.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-04-07T05:54:52Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.4466</id>
<created>2006-04-07T05:54:52Z</created>
<summary type="text/plain">How do you manage failures in providing correct and valuable estimations?</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p>In early January of this year, my wife and I decided to build a new home on a block of land that we had purchased last year. We looked around for a fair bit, and finally found a builder (<a href="http://www.newstart.com.au/">Newstart Homes</a>) who had a plan that suited our budget and our block.</p>

<p>So we decided to sign on the dotted line, paying the hefty deposit of $3000, on the condition that the final costs for site works be told to us before we proceeded further. If the site works came to be of a prohibitive cost, we would have pulled the plug on the project and waited a bit longer before we had enough money to go on.</p>

<p>You see, the block had a curious problem. It sloped for 2.75m (9 feet or 3 yards roughly) from the front to the back in a diagonal way. This required special ways to place the house, exact details of which, I will spare you.</p>

<p>The builder agreed to this condition and proceeded to provide an estimate for the site works, which would be accepted as final, as it would be done by their site surveyors and professional estimators.</p>

<p>So in early February, we received the final site works cost of $23200. An expensive figure, but we were preparing ourselves for it.</p>

<p>To cut a long story short, we then proceeded to customize the house. You know, widen the cupboards a little, paint this room this awful pink, select the tiles and so forth. Except, to be told 2 months later, that the site works done in February was incorrect, performed by an incompetent staff, and unfortunately, the actual cost IS going to be prohibitively expensive.</p>

<p>Now, mistakes happen. That's life, even if it spoils three months of designing and dreaming up your home. What happened afterwards, however, is less than optimal.</p>

<p>The builder decided to get nasty. Ignored phone calls and emails. Blamed us for our 'tight budget' (Yes, that's very professional, blame the victim). And asked <em>us</em> to cancel the project so that he won't have to refund the full deposit, when the mistake as admitted by their estimation manager, was because of their estimation staff.</p>

<p>So, where am I going with this personal story and why am I telling it to everybody unconcerned with the building industry?</p>

<p>There is a lesson here in managing failures of estimations that go beyond one industry and apply very specifically to the software industry. </p>

<p>This week, I had to go to a client's place. Perturbed by the lack of smoothness in a software/hardware rollover, I felt the heat as the client replayed to me a promised estimate provided by my manager and I several weeks earlier. The client complained that the initial estimate had proved wrong and that they were suffering because of it and were clearly unhappy.</p>

<p>I froze on the spot when I heard what she had to say. The words were eerily familiar. Ignoring the specifics, what she said, was exactly what I had said to the builder. There was a clear failure in providing estimates in both cases. I was now the builder and my client was me (ok ok metaphorically). I struggled with the implications. </p>

<p>I thought to myself: "Why am I any different to the builder? I failed to provide a service as a result of incorrect estimation, same as that &#$* builder. Is the client now thinking the same $#%^ thoughts about me?"</p>

<p>Clearly, a case of practice what you preach was in order.</p>

<p>The difference, as you may guess, lay in the way the estimation failure was managed. Instead of blaming the client, I apologized for the delay, provided a reasonable guarantee of future services and delegated tasks to ensure that the problems were rectified as a matter of high priority.</p>

<p>Of course, the core problem remained. What about the flawed estimates? How could I ensure that the estimates didn't fail us again? Further and more <em>importantly</em>, how could I ensure that failure of estimates didn't leave the client more unhappy than is to be expected from a failed commitment? In other words, how do you manage programming estimation failures? </p>

<p>As programmers we are notoriously and perhaps naively lampooned for providing generalized estimations ('If the software guys say it will take 4 man weeks, it will actually take 8'; or 'oh this is simple, it will only take a day!'; or 'you want it <em>when?</em>'). </p>

<p>Yes, not all of us are like this. But we all <em>do</em> fail in our estimates one time or the other. The problem is not in the fact that we provide an incorrect estimate, but if we don't manage the fall out better.</p>

<p>So to repeat the question, how do you manage such failures?</p>

<p>(BTW: If <em>by chance</em> you live in Australia, and <em>by chance</em> you also happen to live in the state of Queensland, and further, due to another fortuitous circumstance you are also looking to build a house, well, first, Hello and Good Luck! and second, avoid <a href="http://www.newstart.com.au/">Newstart homes</a> like the bubonic plague. We still haven't received our deposit back.)</p>]]>

</content>
</entry>
<entry>
<title>Help me win a coffee mug!</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/gvix/archive/2006/04/help_me_win_a_c_1.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-04-04T03:22:09Z</issued>
<id>tag:weblogs.java.net,2006:/blog/gvix/247.4445</id>
<created>2006-04-04T03:22:09Z</created>
<summary type="text/plain">Enter the new JavaMasters competition and help me win a coffee mug.</summary>
<author>
<name>gvix</name>

<email>tech@craftbits.com</email>
</author>
<dc:subject>J2ME</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/gvix/">
<![CDATA[<p><strong>Update 22nd April 2006</strong>: Thank You to everybody for helping me get the second place and win the much coveted mug!</p>

<p>Of course, by winning the coffee mug, I will be a more productive blogger and wake up from my blogging slumber.</p>

<p>This is not entirely a blog entry for personal gain (so you can't boot me off Chris!). I am helping to spread the word of this worthwhile competition. As a previous winner (3rd prize still allows me to call myself a winner. Snif.) I have seen the benefit that this comeptition can bring to no-name software developers and students with half decent ideas.</p>

<p>So.. if you click on the image below, I get points that will help me win a coffee mug. But in the bargain, you get to know of this useful competition for Java ME (OK! J2ME) applications run by Sun and BenQ. A fair trade, I say. Click away!</p>

<p><a href="http://www.javamasters.org/redirect.php?id=oYC8CXWJGdOr6AMCfSvbNlKl5q7NSK"><img src="http://www.javamasters.org/banners/JavaMasters2006_220x90.gif" width="220" height="90" border="0" /></a></p>]]>

</content>
</entry>

</feed>