The Single-Responsibility Principle (SRP) is the first of the five SOLID principles of object-oriented design intended to make object-oriented designs more understandable, flexible, and maintainable. Originally described by Robert “Uncle Bob” Cecil Martin in March 1995 on the comp.object newsgroup as a part of “The Ten Commandments of OO Programming”, the five principles are S - Single-responsibility; O - Open-closed; L - Liskov Substitution; I - Interface Segregation; and D - Dependency Inversion.In this blog, I will focus on the “S” – the Single-Responsibility Principle.What is…
While technologies come and go in the software industry, some have stuck around for a very long time. One notable example: The X Windows System, and with it the Motif widget toolkit. In use since the 1980s, X Windows was the first windowing system environment to offer true hardware independence. For its part, Motif has long been embraced in industries that require stability and longevity, such as financial services and aerospace. It has even been seen on the silver screen in such movies as Men in Black and Jurassic Park. Despite this storied existence, eventually all good things must…
What is Static Analysis?Wikipedia[1] offers this definition of static analysis: "In computer science, static program analysis (also known as static analysis or static simulation) is the analysis of computer programs performed without executing them, in contrast with dynamic program analysis, which is performed on programs during their execution in the integrated environment. The term is usually applied to analysis performed by an automated tool, with human analysis typically being called 'program understanding,' program comprehension, or code review. In the last of these, software inspection…
In the realm of software development, choosing the appropriate framework is paramount to project success. When considering cross-platform application development, two prominent options are Qt and Flutter. Qt, established pre-1995, boasts a robust toolkit built on C++, providing versatility beyond graphical interfaces and catering to complex project requirements. In contrast, Flutter, introduced by Google in 2017, has garnered attention for its rapid development capabilities and cost-effectiveness, making it particularly appealing to budget-conscious developers.This comparison between the…
Increased complexity.That’s the overarching takeaway from the 2024 Embedded World Exhibition & Conference, held April 9-11 in Nuremberg, Germany. Embedded World brings together the global embedded community – last year more than 950 exhibitors and 27,000 visitors participated – and provides a unique view of the latest technologies, trends and challenges impacting this versatile industry. “With the growing prominence of the industrial internet of things (IIoT), we’re no longer talking just about devices, but rather systems of devices,” said Integrated Computer Solutions (ICS) CEO…
In this series on BLoC for Flutter, we’ve examined differences between reactive and traditional programming methods, explored the BLoC architecture, and learned about BLoC widgets. (If you missed it, read Part 1 - Discover BLoC Pattern and Part 2 - A Deeper Look at BLoC Pattern.)
In this installment, I’ll explain how to conduct unit tests with BLoC. This is a critical step in the development process because unit tests can have many unpredictable bugs. Particularly in reactive programming constructs, the code is a bit harder to understand and therefore more error-prone. Let's get started.…
Continuing our series on building with CMake, in this installment we’re taking a look at how to create a library that others can use for their own applications. (If you missed the earlier installments, part 1 shows how to make a simple application, while part 2 explains how to find libraries to use in your application.)
When we create a library that others can use, we ensure the library is platform-agnostic and does not restrict the compiler or operating system. While these are important requirements, they do create a few issues – one being operating system differences and another being the…
For most of our work on embedded devices, the setups are typically quite static: the main board, a display with known resolution, some sensors. But sometimes there is a requirement that shakes up the status quo. On one recent project, that was definitely the case. The customer said “We have an LVDS display, but we want the user to be able to plug in an HDMI monitor at any time and provide a mirrored display of the application.”
Though the request was straightforward, it was not simple. Here’s why.
Back in the days of the X server accomplishing this was not a big deal. Just create…
UPDATED! I originally wrote this blog post in August of 2023 to help you identify the right framework for your next project. In preparing my talk for the upcoming Embedded World North America 2024 conference, during which I will explore this topic in detail, I have updated my original post. I've added the most current information on these frameworks, providing you with a handy resource encompassing the variety of viable options available today for embedded development. (If you're attending the show in Austin, I invite you to join me for my talk on Thursday, October 10 at 10:30 am.)Most…
In part 1 of this two-part series on the Bloc Pattern for Flutter, I defined the Business Logic Components (BloC) pattern as a reactive pattern that separates an application's business logic from its UI logic. The purpose is to make the code easier to maintain and test. I also provided some insight into reactive programming and how it differs from traditional, event-driven programming.
In this installment I’ll dive deeper into the BloC Pattern, exploring various aspects, such as BloC Provider and BloC Builder, and share with you some code examples to help you better understand this important…
In Part 1 of our series on CMake, an open-source, cross-platform family of tools designed to build, test and package software, I provided an overview and showed you how to build a basic CMake project. In today’s Part 2, I’ll show you how to find libraries and link them to your application.
When working on almost any code project you’ll probably want to use another library. There are several kinds of libraries you may need to use. Here’s a look at different types of libraries, and insight on how to use them within an example CMake project.
Libraries can either be compiled within your source…
As developers know, design patterns are crucial to the success of code. If you are a new Flutter developer, you may have encountered patterns such as MVVM. BLoC – or Business Logic Components – is a reactive pattern that separates an application's business logic from its UI logic. The purpose is to make the code easier to maintain and test.
BLoC works based on a library. The BLoC pattern at its core handles asynchronous events and creates a continuous flow with a reactive programming approach. Reactive programming refers to a design paradigm that relies on asynchronous programming…
CMake is an open-source, cross-platform family of tools designed to build, test and package software. According to the CMake website, CMake is used to "control the software compilation process using simple platform and compiler-independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice."
It is widely used because CMake allows developers to more easily create, tailor and test software by simplifying some of the most challenging aspects of the process, including system introspection and executing complex builds.…
Qt 6.5.0 is hot off the presses! Here's a look at what is new and significant in this release, from a new tool to create shader effects for Qt Quick to Qt QML Core, a new module that exposes Qt Core APIs to QML.
Qt Release History
The Qt 6.5 release effort started around November of 2022 with a platform and module freeze, moving to three beta releases and a release candidate until 6.5.0 final was released on April 3, 2023. Qt 6.5.0 is one of the twice-yearly major Qt releases. The 6.5 series will be a long-term support (LTS) release, supported until Q1 of 2026. The previous LTS…
C++23 is the next ISO/IEC 14882 standard for the C++ programming language. Slated for release in December 2023, it will replace the previous C++20 standard (C++ standards are on a fixed three-year release cycle).
While the contents of the standard are still subject to change, they are pretty much finalized at this point.
Compared to some previous C++ standard releases, C++23 for the most part introduces small changes that will not greatly impact how people write code. Most fall into one of these categories: incremental improvements to C++, clarifications to the previous behavior, and…
Wednesday, January 18, 2023 - 08:05
">
•
By Stephanie Van Ness, Jay Noble
•
Testing, Software Development
The key to effective software testing is striking the right balance between automation and manual testing methods. Automation testing, in which the test case is executed by a tool rather than by a human, represents 80% of the software testing market according to Absolute Reports, in large part because it is highly accurate.
Still, there are many situations that call for manual testing. Though it may not always be as accurate as automation, the inclusion of human decision-making in the process provides greater flexibility. For certain types of tests, like usability testing, human testers can…
Thursday, October 20, 2022 - 08:32
">
•
By Jay Noble, Stephanie Van Ness
•
Testing, Software Development
Software testing improves the quality of the product, increases user satisfaction, promotes security, and mitigates costs by identifying defects early when they are less expensive to fix.
But the road to successful software testing can be filled with potholes. From tight deadlines and unstable test environments to last-minute requirements changes and a lack of skilled testers, there are obstacles around every turn. In this blog we focus on one of the least technical – but arguably one of the most critical – obstacles facing software testing teams: poor communication.
Effective…
It is not uncommon for software developers to be involved in more than one project at a time, or need to set up an old project to check a change. Some projects might require a specific OS, or availability of one or more SDKs or libraries. A virtual machine might come handy in these cases. But virtual machines come with drawbacks: they run yet another kernel with a subset of the main system’s cores and RAM. And keeping a full image around for documentation purposes is suboptimal.
To better handle this type of scenario, including containers on embedded devices, I have been using Docker and…
Starting with version 8.0.0 the Qt Creator IDE has a useful new plugin that allows you to browse and clone projects from a GitLab server. While easy to use, it is not well documented, so I thought I would write a blog post that describes how to configure and use it.
Requirements
You will need Qt Creator version 8.0.0 (or later). You can identify the version from the menu entry Help / About Qt Creator...
You will also need the curl program, which is typically installed by default on most Linux, macOS, and Windows 10 and 11 systems.
Enable the Plugin
As of Qt Creator version 8.0.0 the…
The Qt Speech module was introduced in Qt 5.8.0. I made a blog post at that time (June 2017), looking at how it provided cross-platform support for text-to-speech. With the Qt 6.0.0 release, Qt Speech was one of the modules that were no longer available. In the upcoming Qt 6.4.0 release, it is again going to be part of Qt.
Features
QtSpeech provides cross-platform support for real-time text-to-speech output. It uses platform-specific back ends to do the actual speech generation and is supported on the Linux, macOS, Android, and Windows platforms.
Common use cases for text-to-speech…
Qt developers are a passionate bunch. They love to talk about new features, new versions. How cool is this and what needs to be done with that. And it all makes sense. New features and new versions are, eh, new and exciting.
The essential part of Qt though is taken for granted. Most of the time, it does not get the recognition it rightfully deserves. (Here’s a list of what is considered essential, and what are considered add-ons.)
I was working on an interesting project lately. A cross-platform, server side application that can receive messages, create events and redistribute…
The Book C++ GUI Programming with Qt 4 by Jasmin Blanchette and Mark Summerfield was the definitive book on Qt back when it was published in 2006. It was an update to the earlier C++ GUI Programming with Qt 3 by the same authors that came out in 2004. The book contains many Qt example programs, mostly focusing on desktop platforms although there was some coverage of Qt on embedded (which at the time was called Qtopia) and of course this all predated the introduction of QML a few years later.
Back when Qt 5 came out, I spent some time porting the examples to Qt 5 as an exercise…
Part of my job is to prepare Yocto setups for our customers' devices. My goal is twofold: set up an environment a client can easily reproduce; and ensure this environment also allows developers to have multiple projects at the same time. In this blog post I explore the workflow I use in order to achieve this goal.
The recommended way of creating a successful Yocto environment is by using a well-tested OS. That means either installing a specific OS or resorting to some form of virtualization. While the first option is valid, it might get complicated for a developer to handle if a different…
As The Qt Company has shifted its focus from qmake to cmake, it is time to revisit a previous blog post on the Qt Installer Framework. The post presented a small qmake example in which the generation of an application's installer was part of its build.
Today, I'll illustrate how to do the same thing with cmake. It turns out that the process is simpler.
CMake's cpack module
To generate a binary installer or distributable source packages, cmake has the cpack module. As is illustrated in this short video, in its simplest form on Linux, running in the build directory, the set of commands…
This blog, which originally described how to build Qt 6.2.0 (the latest release at the time it was written), has been fully updated to cover the Qt 6.4.0 release.
Qt 6.2.0 was the first release of the Qt 6 series to reach feature parity with Qt 5, and was therefore the first release that was widely adopted for new Qt projects or projects ported from Qt 5. In this post I present a short tutorial on building Qt 6.4.0 from source on Ubuntu Linux.
Ubuntu Desktop Linux is one of the most widely used Linux distributions for desktop use and version 22.04.1 was the most recent long term support (…
Concluding our series on microcontrollers (MCU), I want to turn your attention to NXP hardware as NXP’s I.Mx RT series of MCUs are a popular hardware for low-cost embedded GUI projects. With The Qt Company, a major player in GUI frameworks, demos are not bundled. For this reason, I’ve created this guide to show you how to install Qt for MCU demo applications using MCUExpresso IDE. You can explore this demo before requesting your own trial of Qt for MCU — postponing that action until you're ready to focus on tooling.
Easy Instructions
This guide was tested on the NXP i.Mx RT-1064 board…
Qt Design Studio is a powerful tool for designers and developers that can be used to create professional user interfaces (UI) with the Qt framework for desktop, mobile, MCU or embedded devices with a single codebase.
At ICS, we deal with in-house teams and teams of developers and designers from outside companies, including those of our customers. Collaborating with designers and implementing the functional requirements of an application is not an easy assignment. The addition of Qt Design Studio in the development lifecycle has helped ease the development process for everyone involved, hence…
For years C and C++ have been the dominant system programming languages, especially for high-performance and embedded applications. While I don't think that will change any time soon, there is an interesting alternative that has been increasingly growing in popularity: Rust. Let's take a look at this up-and-coming programming language and what you need to know about it.
About Rust
Rust is a compiled language, with performance comparable to C++ and a syntax that is also similar to C++. It is suitable for much of the same problem domains as C++: systems programming and the development of…