Blogs

Using RapidFort on Windows WSL

RapidFort services can optimize and secure your containers. The command line interface (CLI) tools enable you to interact with RapidFort services.

See also the official manuals.

The "native" way is using a Linux distribution on your desktop. However, the majority of desktops are running Windows. Fortunately we have WSL (Windows Subsystem for Linux).

Step 1. Setup WSL

Install WSL from command line or PowerShell

All expressions of 123456789 and signs +/- which value is 100

Suppose a string of ordered cyphers 123456789. You can insert signs "+" and "-" between any cyphers to make a correct arithmetical expression. The problem is to find all expressions which sum is 100.

This problem may be interesting for dynamic script languages having the function of a string expression evaluation.

E.g. solving in bash

When you still need use the singleton pattern?

The singleton pattern has come a long way since early 1990x. The programmer interview question "Write a singleton" in 1995 has evolved to "Write a lazy initialized singleton" in 2000x, and finished by "Why we do not use a singleton?" in 2010x.

Indeed, the unproved using of multiple singletons should be considered as antipattern. However, we still need singletons in some cases.

static_cast vs dynamic_cast: undefined behavior

Do not use static_cast when you cast from a basic class to a derived one. This may lead to undefined behavior. To handle the polymorphism, a virtual inheritance or a multiple inheritance case always use dynamic_cast instead.

The following short example shows the undefined behavior cases. This works with GCC, VC and online C++ shells:

Qt Test limitations and workarounds

Pros and cons

Why use Qt Test for unit testing and TDD (test-driven development)?

  • small testing framework (about 6K lines of source code);
  • seamless integration with QtCreator development environment;
  • full support of Qt framework including classes/types and signal/slots;
  • simple to start and use.

However, there are some drawbacks, too.

Pages

Subscribe to RSS - blogs