Industry News, Trends and Technology, and Standards Updates

Cimetrix Book Club: "The Art of Unit Testing"

Posted by Westley Kirkham; QE Engineer on Oct 27, 2020 10:56:00 AM

Cimetrix-book-club-1Today’s blog posting highlights the latest and most recent activity with the Cimetrix Book Club. Our employees constantly strive to develop their skills, share information, and keep up to date with the industry. Part of this effort includes an employee book club that involves many of our team members each month, and from time to time we cover some of their favorites here on our blog!

Today's book is titled "The Art of Unit Testing" by Roy Osherove. The book review is by Westley Kirkham, a Quality Engineer based in Salt Lake City, UT, USA.

“The Art of Unit Testing” guides the reader step by step from writing the first simple tests to developing robust test sets that are trustworthy, maintainable and readable.

In the first section, Osherove explains what a unit test is, the properties of good unit tests, and why they are so important. The lion's share is dedicated to the nitty-gritty of writing and maintaining unit tests specifically, and testing suites generally. The first part of the section goes in depth to show how Mocks, Stubs and Isolation frameworks are used to test your code. The last section discusses how to deal with resistance to change from co-workers and management if you're trying to introduce Test-Driven Development or Agile methodologies, as well as how to deal with legacy code. Osherove also shares his insights on what tools he believes are the best aids in unit testing. ReSharper is one of his favorites, but he also reviews Nsubstitute, Moq, CodeRush and others.
book-club-art-of-unit-testing

One section that stood out to our team was Osherove's three pillars of a good unit test—trustworthiness, maintainability, and readability.

Trustworthy tests are up-to-date, simple and correct. There are no duplicate tests, and they do not test any old functionality or functionality that has been removed. The unit test only tests one item and doesn't conflict with other tests. The bugs the test finds are actual bugs in the code, and not bugs in the test.

Maintainable tests are flexible, and don't break with each minor change to the product. The tests are isolated. They are not over-specified and they are parameterized.

Readable tests are easy to understand and do not require the developer or tester who comes after you to spend extra time understanding what you've written. The test names are descriptive, and the asserts are meaningful. Any failures or issues caught will lead the developer in the right direction.

These three pillars should apply to all that we write, not just tests.

At Cimetrix, much of what Osherove teaches is already integrated into our engineering culture. As part of our implementation of Agile, developers write unit tests to verify that the functionality they have coded is correct. It is then reviewed by another developer and a member of the QE team to ensure that common use cases and important edge cases are covered and that the functionality is complete. All code must follow naming conventions and styles verified through ReSharper. For all of our products, unit tests are run on each build, and integration tests are run nightly.

Osherove's lessons on unit testing implementation, testing suite organization, and test-driven development integration are simple and practical. This book would benefit any team looking to improve the fidelity of its software products and the efficiency of its engineers.

Topics: Cimetrix Company Culture, Programming Tools, Smart Manufacturing/Industry 4.0, Book Club

Resources Round-up: Presentations

Posted by Kimberly Daich; Director of Marketing on Oct 3, 2019 11:16:00 AM

Resource Center-1The Cimetrix Resource Center is a great way to familiarize yourself with standards within the industry as well as find out about new and exciting technologies. 

Our resource center features information about equipment connectivity and control, data gathering, GEM (SECS/GEM)EDA/Interface A, and more. These standards are among the key enabling technologies for the Smart Manufacturing and Industry 4.0 global initiatives that are having a major impact on the electronics assembly, semiconductor, SMT and other industries. Manufacturers and their equipment suppliers must be able to connect equipment and other data sources, gather and analyze data in real time, and optimize production through a wide variety of applications.

The many presentations featured in our resource center provide in-depth coverage from Cimetrix expert's presentations at many different conferences and expos around the world. Some of our most popular presentations are below.

Be sure to stop by our Resource Center any time or download the presentations directly from the links in this posting.

Resources

Topics: Industry Highlights, SECS/GEM, EDA/Interface A, Doing Business with Cimetrix, Programming Tools, Photovoltaic/PV Standards, Smart Manufacturing/Industry 4.0

Cimetrix Book Club: "Don't Make Me Think"

Posted by Gabe Hanson: Software Engineer on Sep 18, 2019 11:38:00 AM

Cimetrix-book-club-1Today is our next edition of the Cimetrix Book Club. Our employees are always striving to develop their skills, share information, and keep up to date with the industry. Part of this effort includes an employee book club that involves many of our team members each month. We will cover some of their favorites from time-to-time here on our blog!

Today's book is called "Don't Make Me Think (Revisited)" by Steve Krug. The book review is by Gabe Hanson, a Software Engineer based in Salt Lake City, UT, USA.

dont-make-me-think-1This short but dense book was written to guide software developers through their journey of building user interfaces. While it was targeted specifically for web and mobile user interfaces, the general topics and suggestions presented will benefit almost anyone developing any kind of software. The general theme of the book ties directly with the title: make the end user think as little as possible while using your software.

The book covers topics ranging from general design philosophies, to optimal user interface experiences, and even more nuanced topics like accessibility considerations and color themes. Each of the 13 chapters presents common usability issues found throughout the stages of building a website or mobile application, and discusses how a developer might approach mitigating such problems. For example, chapter 6 discusses how one might build a website that is easy to navigate by using the concepts of "street signs" to help guide the user through your website. This chapter explains simple ways of constructing web pages with easily-locatable buttons and other kinds of navigation techniques to prevent the user from getting lost, frustrated, and eventually leaving your website.

We found chapters like these most valuable because these same ideas can apply to almost every piece of software we build for the manufacturing industry. Given the potentially complicated nature of navigating through an equipment's control software, it is important we design our software to be easy to use and navigate. Not just for convenience, but to reduce user error - something that can help avoid mistakes costing potentially millions of dollars.

Not only was reading the book educational, but it presented itself in a very entertaining and engaging way. Most of the pages contain humorous illustrations and simple diagrams to explain the points the author makes. One could argue the book itself incorporates some of the lessons it teaches, by helping the reader easily digest the points presented; to not "make them think so hard" about the complicated and subjective process of designing a simple yet complex piece of software.

I can safely say this book is recommended for any and all software teams aiming to build software that is easily usable for all sorts of end-users. Our team found this book to be an excellent guide in constructing software that is not only useful but easy to use.

Topics: Cimetrix Company Culture, Programming Tools, Smart Manufacturing/Industry 4.0, Book Club

Resources Round-up: Videos

Posted by Kimberly Daich; Director of Marketing on Aug 3, 2019 1:28:00 PM

Resource Center-1The Cimetrix Resource Center is a great way to familiarize yourself with standards within the industry as well as find out about new and exciting technologies.

Our resource center features information about equipment connectivity and control, data gathering, GEM (SECS/GEM)EDA/Interface A, and more. These standards are among the key enabling technologies for the Smart Manufacturing and Industry 4.0 global initiatives that are having a major impact on the electronics assembly, semiconductor, SMT and other industries. Manufacturers and their equipment suppliers must be able to connect equipment and other data sources, gather and analyze data in real time, and optimize production through a wide variety of applications. The videos and video series featured in our resource center provide in-depth coverage of some of these concepts.  Some of our featured videos are below.

Be sure to stop by our Resource Center any time or watch the videos directly from the links in this posting.

Resources

Topics: Industry Highlights, SECS/GEM, EDA/Interface A, Doing Business with Cimetrix, Programming Tools, Photovoltaic/PV Standards, Smart Manufacturing/Industry 4.0

Cimetrix Book Club: "Microsoft Visual C# Step by Step – Eighth Edition"

Posted by Richard Andrew; Software Engineer on Jul 24, 2019 11:23:00 AM

Cimetrix-book-club-1Today is our next edition of the Cimetrix Book Club. Our employees are always striving to develop their skills, share information, and keep up to date with the industry. Part of this effort includes an employee book club that involves many of our team members each month. We will cover some of their favorites from time-to-time here on our blog!

Today's book is called "Microsoft Visual C# Step by Step – Eighth Edition" by John Sharp. The book review is by Richard Andrew, a Software Engineer based in Salt Lake City, UT, USA.book-club-microsoftThis book was designed to be an overview of the programming language, C# and cover the breadth of most topics while delving in depth on some of the topics.  It was designed to be helpful for even the most novice developers while still being useful to advanced programmers looking to sharpen their craft.  This was perfect for our group because we had a mix of aspiring developers (or developers who hadn’t spent much time programming yet), experienced developers who were new to C#, and experienced developers just looking to get better and learn new things about the language and about best practices.

The Book was split up into four sections. The first two sections focused on general programming practices and structure that are important to any programming language but written in a way that was applicable for C#. These sections mainly focused on breadth and covering many topics. This was especially helpful for our aspiring developers and the developers who were just learning or becoming familiar with C#. For our more experienced developers, these sections were more of review or relearning what they already knew.

Section three dove deeper into more advanced programming topics and provided a good overview for some of our novice developers, but it was really geared for a more experienced developer. This section talked about generics, collections, event handling and querying expressions. Lots of new tools to add to our kits.

Section four focused primarily on building Graphical User Interfaces (GUIs) with C#, and the author specifically chose to highlight using UWP applications (Universal Windows Platform). This section on the surface seemed to be less relevant to what we were working on. But after reading and looking looking at the code behind it, it became very relatable to WPF (Windows Presentation Foundation), which is an application we use in our products. This section was also extremely helpful for anybody seeking to become Microsoft Certified. As we currently have several engineers in our group striving to become Microsoft Certified, this section was helpful preparation. 

All in all this book was excellent for our team. It gave an introduction and an overview to our novice developers while still providing a lot of education to our more experienced developers. A great thing about this book were the examples in each section that, when we really dug in, gave us rich knowledge and context to everything the author was trying to convey. You really get out what you put into the study of this book. 

Topics: Cimetrix Company Culture, Programming Tools, Smart Manufacturing/Industry 4.0, Book Club

Resources Round-up: Ebooks

Posted by Kimberly Daich; Director of Marketing on Jun 19, 2019 11:23:00 AM

Resource Center-1The Cimetrix Resource Center is a great tool for anyone who wants to learn more about industry standards including Equipment Connectivity and Control, data gathering, GEM (SECS/GEM)EDA/Interface A, and more. These standards are among the key enabling technologies for the Smart Manufacturing and Industry 4.0 global initiatives that are having a major impact on many industries. Manufacturers and their equipment suppliers must be able to connect equipment and other data sources, gather and analyze data in real time, and optimize production through a wide variety of applications. The free eBooks listed below provide in-depth coverage of the some of these concepts.  They have been written by technical experts who have participated in and led the standards development processes for more than two decades.

Be sure to stop by our Resource Center any time or download the white papers directly from the links in this posting.

Resources

Topics: Industry Highlights, SECS/GEM, EDA/Interface A, Doing Business with Cimetrix, Programming Tools, Photovoltaic/PV Standards, Smart Manufacturing/Industry 4.0

Resources Round-up: White Papers

Posted by Kimberly Daich; Director of Marketing on Mar 26, 2019 11:15:00 AM

Resource Center-1The Cimetrix Resource Center is a great tool for anyone who wants to learn more about industry standards including GEM (SECS/GEM), GEM300, EDA/Interface A, and more. These standards are among the key enabling technologies for the Smart Manufacturing and Industry 4.0 global initiatives that are having a major impact on many industries. Manufacturers and their equipment suppliers must be able to connect equipment and other data sources, gather and analyze data in real time, and optimize production through a wide variety of applications. The free white papers listed below provide in-depth coverage of the most broadly used equipment connectivity standards. They have been written by technical experts who have participated in and led the standards development process for more than two decades.

Be sure to stop by our Resource Center any time or download the white papers directly from the links in this posting.

Resources

Topics: Industry Highlights, SECS/GEM, EDA/Interface A, Doing Business with Cimetrix, Programming Tools, Photovoltaic/PV Standards, Smart Manufacturing/Industry 4.0

Improving Tests through Coded UI Test (CUIT)

Posted by Devon Truman; Quality Engineer on Jun 21, 2017 11:30:00 AM

Have you ever had that itch you just can’t seem to ever get rid of despite all your scratching? Well, UI Testing is that same itch for many developers. Fortunately, Coded UI Test exists, allowing us to scratch that itch with ease and relieve the heartache that is UI Testing.

A very important part of our development process is testing our software to ensure that each product is the best it can possibly be for our customers. There can often be a lot to test in a short period. Having a fast, efficient, repeatable, and reliable way to make sure everything is tested is what we strive for. Coded UI Test (CUIT) allows us these attributes.

Coded_UI_1.png

CUIT creates automated tests used for functionality testing of a GUI application. There are several ways to go about this, the first being the ‘Record and Playback’ feature that CUIT provides. This option allows us to set up tests by starting the recording feature and performing the tasks the developer would like to test. The recording feature will record everything the developer does and automatically generate a test for us. After it is generated we can play it back to run the test as many times as we want.

The recording feature alone is not the only option CUIT provides of course. However, the recording feature certainly does help when writing our own scripts when we want to go beyond the basic testing features available through the recording. Since the recording feature generates its own C# code, we can use those generated scripts to see how the CUIT works and expand on those scripts to fit our needs.

Coded_UI_2.png

We can see in this generated code snippet how CUIT goes about looking for a button in a WinForms application. This button in the above sample is named ‘Refresh’ and once CUIT finds this button through this code snippet, we can do many different things with the button. This includes clicking the button, verifying the test in the button, seeing whether the button is disabled or not, and many other things we might want to check in our tests. Now with this code snippet in mind we can modify it to look for other buttons or other controls such as checkboxes, radio buttons, and other controls we might want to include in a test.

We want to be able to expand upon our tests through the help of our Software Engineers and not just our Quality Engineers. Thankfully, CUIT uses C# instead of a proprietary scripting language, making it easy for our Software Engineers to go from working on our applications to writing tests through CUIT for our applications. This enables us to collaborate effectively and make sure our products are being tested as best they can.

CUIT is a great way to develop sophisticated tests for our applications to assure our customers will be satisfied with our products. We will continue to create more tests within CUIT to help us make sure no new bugs are introduced. The more tests we can automate through CUIT, the faster and more efficient our testing process will be and the easier it will be for us to identify potential problems if they arise, helping us create a product we can continue to be proud of.

Topics: Programming Tools

XP is Dead, It’s Time to Move On

Posted by Derek Lindsey: Product Manager on May 19, 2016 1:00:00 PM

Its-dead-jim.jpg

When my daughter turned one year old, she got a very soft blanket as a birthday present. She loved that blanket and would take it everywhere with her. She couldn’t/wouldn’t go to sleep at night without it. When she got old enough to talk, she called it her special blanket or “spesh.” Needless to say, after many years of toting that blanket around, it started to wear out – in fact, it started getting downright nasty. She adamantly refused to part with it even though it was just a rag with little redeeming value.

A couple of years ago, Microsoft made the following announcement: “After 12 years, support for Windows XP ended April 8, 2014. There will be no more security updates or technical support for the Windows XP operating system. It is very important that customers and partners migrate to a modern operating system.”

In the immortal words of Dr. Leonard “Bones” McCoy from Star Trek, “It’s dead Jim!”

windows_xp-100154667-large.png

Many arguments have been proffered on both sides as to why users should stay with or move away from XP. Windows XP was first introduced in 2001. That makes the operating system 15 years old — an eternity in computer years. The main argument I see for upgrading from XP is that it is impossible to keep up with advances to the .NET framework and remain on the old operating system. By staying with XP, you are missing out on new features and technologies. These features include taking advantage of better hardware integration for improved system performance and being able to use 64-bit applications and memory space.

Since Microsoft no longer supports XP and no longer provides security updates for the OS, staying with XP is a security risk. Any security holes that have been discovered since Microsoft withdrew support have been ruthlessly targeted.

To come full circle, my daughter finally did give up the little rag that she had left of the blanket. I don’t remember what ultimately made her give it up. She is now 18 and a few months ago, we came across that small piece of her special little blanket that we had stored away. The rag brought back good memories, but we were both glad it had been retired. Isn’t it time to do the same with XP?

Topics: Doing Business with Cimetrix, Programming Tools, Cimetrix Products

Testing for and Finding Memory Leaks

Posted by Bill Grey: Distinguished Software Engineer on May 12, 2016 1:00:00 PM

An issue that inevitably crops up in long-running, complex software systems is memory use. In the worst cases it manifests as a crash after several hours or days of running when the software has consumed all available memory.

Another inevitability is that these out-of-memory crashes are found very late in the development cycle, just prior to a delivery date. Or, worse, they are found after delivery. Given the fact that the crashes take hours or days to occur because the testing cycles are very long, they cause a lot of stress for the development team and frequently delay delivery.

The rest of this blog contains a proposed process to find these issues sooner in the development process and some tools to help the developer investigate memory use.

Early and continuous testing of the software system is the key to avoiding delivery of memory leaks. As soon as possible a dedicated system should be set up for endurance testing. The software should be built in debug mode, but it is not necessary to run it in a debugger. Preferably, for equipment control software, this would use a simulator for the hardware. This should be done as soon as there is enough of the software developed to be able to perform any significant functionality in a repetitive manner. This test can evolve as more of the software is developed with functionality being added to the test as it becomes available. For semiconductor equipment control software, a logical test would be to perform wafer cycling as this would exercise a good majority of the software. 

Memory.png

This endurance test should be kept running during development, right up to delivery. The computer running the endurance test should be configured to collect Windows crash dumps for the software application(s) and have Windows Performance Monitor configured to monitor Private Bytes for the application(s), https://msdn.microsoft.com/en-us/library/windows/hardware/ff560134(v=vs.85).aspx. The test should be checked daily to see how the Private Bytes memory use has changed.  If the application has crashed, then the crash dump .DMP file can be collected and analyzed. Visual Studio can be used to open the .DMP file for analysis on the developer’s computer. 

The endurance test should be maintained and updated as the software is updated. However, since run time is important for this test, consider only updating it on a weekly basis unless the update is to fix an issue that caused the test to crash.

If the endurance test shows that the Private Bytes for the application increases steadily with no signs of levelling off, then the application probably has a memory leak.

For C++ programs, Microsoft’s UMDH memory dump utility is very useful for tracking down what allocations are occurring in the application, https://msdn.microsoft.com/en-us/library/windows/hardware/ff560206(v=vs.85).aspx. The concept is to take two or more memory snapshots and analyze the differences to see what new objects have been created. Remember to have the software built in debug mode so full debug information is available in the memory dumps.

For .NET programs, newer versions of Visual Studio have built in memory profiling, https://msdn.microsoft.com/en-us/library/dd264934.aspx.

There are third party memory analyzers on the market that some have found to be useful. Most of these will report numerous false positives that the developer will have to wade through to get to the real leaks. Most third party memory analyzers for .NET seem to frequently report false positives for COM objects. 

The tools just provide the developer a location to review the code for leaks. It still requires diligence and expertise on the part of the developer to analyze the information and find the cause of the leak. Seldom do the tools create a treasure map with "X" marking the spot of the leak.

Having an endurance test running allows the developer to understand the memory profile of the software and watch how the profile changes as the software changes. Early detection is critical given the length of the testing cycle.

Topics: Doing Business with Cimetrix, Programming Tools, Cimetrix Products