Wednesday, February 15, 2006

Sun Java Certification

I'm currently studying for my Sun Certified Programmer (SCJP) certification because it's a prerequisite for the certification I really want: Sun Certified Web Component Developer (SCWCD). My job consists of writing Java servlets and all sorts of HTML, JavaScript, and CSS for my company's web-based application, so I want something that proves I know what I'm doing and something I can use later when I go to the company to ask for a big raise (or another company).

Know any Sun Java certified individuals? How much do they make? :)

Technorati Tags: , , , , ,

Want to get a head start in programming for Vista's Sidebar?

This morning, I found an little snippet in one of my favorite blogs (The Furrygoat Experience) pointing me to a blog I hadn't seen before with two articles about writing widgets for the Windows Sidebar that will make its grand debut in Vista.

If you want to get ramped up for Vista's Q4 launch, head over to Ooey GUI and take a look at these two articles introducing us to gadgets.


Technorati Tags: , , , ,

Friday, February 10, 2006

The ADA is a Danger to Web Developers Everywhere

In my daily news crawl, I stumbled upon this gem of a turd...

From CNet: Blind patrons sue Target for site inaccessibility

[Bruce] Sexton, along with a blind advocacy group, filed a class action lawsuit this week against Target, alleging that the retail giant's Web site is inaccessible to the blind and thus violates a California law that incorporates the Americans with Disabilities Act.

The suit, filed in Northern California's Alameda County Superior Court by Sexton and the Baltimore-based National Federation of the Blind (NFB), claims that Target.com, "contains thousands of access barriers that make it difficult, if not impossible, for blind customers to use."

...

"A blind patron cannot purchase anything at Target.com without sighted help," Basrawi said, adding that Target.com is just one prominent example of many corporate sites that fail to meet minimum Web accessibility standards. "This is the tip of the iceberg."

I apologize to those of you who are disabled in one fashion or another, but this is simply wrong. I can understand the frustrations because my dad has been nearly deaf his entire life. He won't claim it as a disability, but it certainly is. But the great thing about him, is that he doesn't sue a retailer because they don't provide people who know sign language (which is good because he doesn't know it either).

The Americans with Disabilities Act (ADA) was enacted to ensure that handicapped individuals are given every reasonable concession by brick-and-mortar retailers and government installations so that they may live and function independently. For instance, this law was enacted to afford wheelchair-bound individuals the right that when they enter the grocery store, they will be able to purchase the items they need on their own and that, if the need arises, they'll be able to use their restroom facilities. This only makes sense. Yes, when it was first enacted it cost a great deal of money to upgrade existing installations, but almost all new buildings since have been built ADA-compliant.

But outside of government-run websites, this law SHOULD NOT carry over onto the web. Just because Target.com is not accessible doesn't prevent Bruce Sexton from being able to live independently. Just because he chooses to shop online doesn't mean that is his only option.

We've heard the term "slippery slope" all too often these days, but this is yet another example. If all e-commerce sites were forced to be ADA-compliant, there would be no Flickr, no Digg, virtually no site that makes gratuitous use of JavaScript and CSS. Any "creative" web application using AJAX or Flash would immediately be thrown to the dogs who call themselves lawyers.

It is laws like these that unnecessarily impede progress and creativity. The added cost of making "alternatively-accessible" copies of a small business' site could either force them to stay off the web completely or ultimately prevent them from offering their more creative services. Web developers must give special attention to this lawsuit because this could change our jobs and lives for the worse.

Thursday, January 12, 2006

Reliable JavaScript Debugging with Microsoft Script Editor

As a software engineer, I'm always looking for new ways to improve my code and my productivity. In this never-ending search, I occasionally run across tools that make my job much easier and become part of my standard toolset.

Beginning JavaScript developers often rely on alert() statements to debug their code, telling them when the code's passed a specific point and maybe relaying some data. While alert() may work for small projects, it becomes counter-productive when you add any amount of complexity to your code. Not only does it interrupt the script as it's running, it can often fails to give you the information you need. You must also spend the extra time carefully removing the statements from your code before you move it to production.

Microsoft Script EditorThat's where the Microsoft Script Editor comes in. It's a script debugger with the look and feel of Visual Studio, without the overhead (or cost) of VS. It is included in Office XP and 2003 and will completely revolutionize the way you develop JavaScript code.

The Office installation doesn't push a shortcut to the Microsoft Script Editor (MSE) to your Start Menu, so you will have to track it down for yourself. The file is named MSE7.EXE and can be found in %Program Files%\Microsoft Office\Office11 (replace Office11 with Office10 if you have Office XP instead of 2003). If a search of your hard drive doesn't turn up the executable, you're going to need to grab your Office installation CD. Once the installation begins, select the Advanced Install and make sure the following option is set to install: Microsoft Office -> Office Tools -> HTML Tools -> Web Scripting -> Web Debugging.

Sample script in MSEI threw together a little meaningless sample script just to highlight the main features that will affect you immediately. (I was going to post the code here directly, but Blogger isn't playing nice with my <pre> tag. If you're a coder, you're more than capable of throwing together a good example on your own.) You can see this code “in action” in the screenshot to the right. The MSE does a good job of syntax highlighting, but doesn’t every good editor in this day and age? We’re looking for a debugging tool, so let’s move on to the debugging functionality...

Script with breakpoints in placeTo add breakpoints to your code, just click in the gutter on the left next to the code on which you would like it to break. When you run the script, it will break every time you reach this point, so it’s a great way to get a look at how your code actually works behind-the-scenes. Once your breakpoints are in place, hit F5 to run the page in your browser.

To get the code running, I typed “Junk to display” in the text box and clicked the "Submit test string" button, which caused the SubmitTestDisplay() function to be called. As you can see, the MSE took control from the browser and paused the script’s execution at the breakpoint within the function.

Script stopped at the first breakpointAvailable to you are all the “standard” debugging tools: a list of the local variables that have been created or will be created in the current function, the call stack in case you’re not sure how to got to the currently executing code, and a watch pane so you can keep an eye on elements of your choosing. At this point, you can stop to examine the contents of data objects, step through the code manually, or continue execution, just as the case with any standard debugger.

With the increasing complexity of my JavaScript code with object-oriented programming and asynchronous communication between the server and the browser, the MSE has cut my debugging time by over half. Since most corporations have installations of Office already in place, you will likely find yourself with no cost incurred for this performance boost. And if yours doesn’t, the time savings from this tool can almost completely justify its purchase.

Thank you for reading this far. I realize this is a somewhat long article, but this is just a brief overview of the basic features of the MSE - there’s so much more it can do, including attaching to live Internet Explorer processes so you can debug scripts stored server-side (which I may go over at a later date). I encourage you to dig deeper as your projects grow to really take advantage of its power.

Happy coding!


Technorati Tags: , , , , , ,