Finding The Right Solution

July 7, 2003
Write once with no bugs. That's every programmer's dream. Unfortunately, it doesn't usually work in practice. Fixing a problem requires finding the problem, then applying an appropriate fix. In many cases, there's...

Write once with no bugs. That's every programmer's dream.

Unfortunately, it doesn't usually work in practice. Fixing a problem requires finding the problem, then applying an appropriate fix. In many cases, there's more than one solution. Searching for these solutions and knowing when to do this separates the novices from the pros.

I was reminded of this the other day when an HTML question arose. There was a need to post a page of text that contained preformatted information. The tools were a Web page interface and a document editor. The problem was that the Web page interface tried to be HTML-friendly and would remove spaces and blank lines that threw off the formatting. In this situation, the kinds of tools used and the procedure caused the problem.

This is similar to the problem of hardware and software debugging. A variety of tools and methodologies exists. The variations in capabilities and how well they're applied can make the difference between finding and not finding a problem and a solution. It can also make the difference between locating the root problem in minutes or days.

ICE (in-circuit emulation) is invaluable, but ICE hardware tends to be expensive. It also requires a chip design amenable to ICE. The speed and complexity of today's microcontrollers also makes dealing with ICE rather difficult.

JTAG (IEEE 1149.1) is one approach. But its throughput becomes a limitation, and there's the need to stop the processor to utilize the debugging features. Vendor-specific advances like ARM's ETM (Embedded Trace Macrocell) provide real-time features that bypass these limitations. However, it may be standards like Nexus 5001 that deliver the debugging goods as JTAG has done thus far (see "Next Nexus Delivers Debug Data," p. 50).

The HTML problem turned out to have a number of solutions like passing the original document into an HTML editor and then grabbing HTML output. This was an improvement over the manual editing that was originally used. After a little more digging I found the

 HTML tag description. Adding it to the start of the document solved the problem. The 10-second solution beat the other alternatives in speed and simplicity. Best of all, there was no need to check the original copy for changes. Hopefully all your debugging problems will turn out as well.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!