Posts Tagged ‘LinkedIn’

IE6 Javascript Textbox Focus under Rails

Thursday, January 28th, 2010

Something unusual. While using Rails, I noticed one of my simple Javascripts wasn’t working under (surprise!) Internet Explorer 6. Usually, you can just grab the control by its ID using the DOM and then call the focus method:

document.getElementById("myControl").focus();

So, this wasn’t working. After some Googling, I found that there were some folks suggesting that the timing of the events was causing the focus() method to fire at the wrong time to work properly. The solution is to wait for the page to load completely before firing the Javascript code.

Under Prototype, this can be accomplished as such:

document.observe("dom:loaded", function()
{
$('myControl').focus()
});

or using JQuery, try the following:

jQuery(document).ready(function()
{
$("#myControl").focus()
});

I would be remiss if I did not mention the added benefit of unobtrusive code. By utilizing the observe(“dom:loaded” or (document).ready you can safely place all your Javascript into a separate linked file. Since the scripts will not fire until the page has completely loaded, there is never a need to embed the Javascript code directly into the webpage positioned after the controls you want to affect. Embedding Javascript is considered bad coding practice.

Netbeans 6.8 Install Problems?

Thursday, December 17th, 2009

Like a lot of development companies, The Untangled Web has been eagerly awaiting the release of Netbeans 6.8. While previous versions supported PHP and some affiliated frameworks, 6.8 offers the most comprehensive integration of the Symfony Framework we are aware of in an IDE.

Installing the program on our Windows machines required a couple of steps as the installer complained over-and-over about the absence of a compatible Java runtime.

Java SE Development Kit (JDK) was not found on this computer

JDK 6 or JDK 5 is required for installing the Netbeans IDE. Make sure that the JDK is properly installed and run installer again. You can specify valid JDK location using -javahome installer argument.

This is odd, we thought, since we have been using Netbeans 6.5 happily for some time and it was running off Java 1.5. After mucking with JAVA_HOME, CLASSPATH and trying to pass the –javahome path to the installer at the command line, we found a way (Google is your friend) to force feed the Netbeans 6.8 installer.

First, extract the JAR installer from the executable:

This will dump a file into your directory called bundle.jar. The JAR file can be executed using your Java 1.5 or 1.6 installation as follows:

Your command window will begin to churn out all the verbosity that is the Netbeans installer and, within a few moments, the installer wizard will appear in all its glory:

Follow along with the usual machinations of software installation and your Netbeans IDE will run happily thereafter.

iTunes App Store and Quality Code

Tuesday, September 1st, 2009

I recently read an article about an angry iPhone / iPod Touch developer who wrote a harsh criticism of Apple on his blog. The developer, Joe Stump, created an application called Chess Wars that allows for chess to be played by Facebook users via these mobile devices. Sounds cool.

What’s not cool is that the software contained numerous bugs upon release. Joe admits that the defects were missed by his company: Blunder Move. He also notes that Apple did not identify the bugs during the app review process.

In response, Blunder Move submitted a patch for the chess app to fix the problems users were experiencing. Apple made the patched version available on the App store. Once again, the app contained a serious flaw. This flaw was not detected by Blunder Move or Apple before release.

A third version has been created and submitted to Apple for release. Joe is furious with Apple because this latest build has not yet been made available by Apple. He fears, perhaps correctly, that the defective program is ruining his company’s reputation and hurting future sales.

I empathize with Joe. It’s a serious bummer when, as a developer, you release software with bugs. Every seasoned developer has been there. The feeling is akin to having your guts turned inside out. You are anxious to see a patch released and ‘your baby’ fixed.

However, who is at fault for this unfortunate situation? My understanding is that the developer is responsible for the quality of the product. That the code should be thoroughly tested before release. That integration, regression and acceptance testing be performed to minimize mishaps.

Apple Computer’s role in this business relationship is to provide a distribution model, which they do quite effectively. They are to examine the app to ensure that it adheres to their policies (no porn, etc). I do not believe that they can be viewed as an extension of a company’s QA department unless they are contacted directly using the ADC support incident request:

The iPhone Developer Program includes two Technical Support Incidents where Apple engineers will provide you with code-level assistance, helpful guidance, or point you towards the appropriate technical documentation to fastrack your development process.

In regard to the initial bug fix release also containing bugs, Joe states ’shit happens’. Nonchalant but true. Vilifying Apple and shifting responsibility does not address the greater issue: releasing quality, well-tested software. And while I feel for Joe having to wait 6 weeks (so far) for the next version of Chess Wars to be queued for distribution, I’d also caution developers to be 99.999% sure that the product you release is ready for prime time.


All works licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License. And that's a mouthful!