Software Development

Computer languages, programming tools and software development methodology

Naming Log Files for CAD Applications

Naming Log Files for CAD Applications

An article about log file naming?  Well, somebody’s got to do it, because so few software tools get it right.

CAD software runs a long time in batch mode, so the log file is often the users’ sole feedback. When running a flow, I constantly check progress by listing the log files with the ls command. Repeatedly. All day. Their names and their sort order matter. More

Write Effective Error Messages

Write Effective Error Messages

You might hope that error messages will rarely appear, but whenever your program or design flow does output an error message, users will try to interpret its every nuance. Depending on how they react to messages, enormous amounts of time can be saved or wasted. The tragedy is that good messages are actually quite inexpensive–they consume little run time or memory, they require no exotic algorithms. More

Test XML Output Using Python doctest

Test XML Output Using Python doctest

Python doctest combines unit testing with documentation.  With doctest, you put your unit tests in the Python docstring, and documentation generators like Sphinx render your tests as usage examples.  It’s easy to compare a method’s output to an XML string using doctest.  It’s not so easy when you want the XML string pretty-printed for the sake of  clear documentation.  Here is a simple solution. More

Test PyQt GUIs with QTest and unittest

Test PyQt GUIs with QTest and unittest

PyQt is the Python binding of the popular Qt cross-platform UI and application framework.  For unit testing, PyQt clients are expected to use the standard Python unittest module, with just a little help from the PyQt QtTest module.  It is not immediately apparent how to blend these two frameworks into a unified unit testing strategy.  In this article, I show you how to unit test a PyQt GUI dialog using only modules included in PyQt and Python.
More

Polymorphic C# and Java Using SWIG

Polymorphic C# and Java Using SWIG

By default SWIG generates C# and Java code that does not support downcast for polymorphic return types.  I found a straightforward way to solve this, provided your C++ code has a way to identify the concrete class of the C++ instances that are returned.  That is, this technique will work only if the C++ API you are wrapping with SWIG has something similar to C# object.GetType() or Java Object.getClass(). More

CMake Directory Variables

CMake creates software build systems for a wide variety of platforms based on a single, unified control file–it’s a makefile maker. You create the CMake control file once and based on this file, CMake will create almost any build environment for you: GNU Make for Linux, Eclipse project, Visual Studio solution for Windows, and the list goes on. More

Use Multilingual UTF-8 Strings with any OpenAccess Version

Use Multilingual UTF-8 Strings with any OpenAccess Version

In this article I show you how to use multilingual UTF-8 strings with standard, unmodified OpenAccess oa-22.04p028 release.

In the last  article, I introduced UTF-8, the popular 8 bit encoding of Unicode into multibyte character strings that can represent virtually every written language in history.  I presented the OpenAccess software changes required to fully support UTF-8 and showed you how to convert your existing application software to properly manipulate UTF-8 in the OpenAccess oaString class. More

Modify OpenAccess to Handle Multilingual UTF-8 Strings Natively

Modify OpenAccess to Handle Multilingual UTF-8 Strings Natively

I once had a job scrutinizing Virtuoso schematics that contained many useful annotations written in Italian.  EDA tools generally support only ASCII strings, but the Italian designers were lucky–theirs is one of the few languages that can be written naturally using the same characters as English.

Wouldn’t it be nice to annotate designs in OpenAccess databases using any of the world’s languages?  You can do it right now, using any OpenAccess release. More

Load More