Posted inInformation Technology / Thank You Sir May I Have Another

Qt 6 – Remove Console from JavaScript and QML

I originally sent this to the qt-interest mailing list but haven’t seen it bubble out to the world so re-posting here and, hopefully many other places.
===

This is becoming a growing issue in the industry. The Console object needs to be removed from Qt. The project I walked onto I had to spend a week digging it out because it violates the coding standards but that story was pushed deep into the backlog and ignored. A recent message thread on this list where people found all of the calls inside Console.log() were still being made. This has become an unsafe and overused crutch.

Yes, in theory they should have been able to turn off “qml” and “js” output

https://doc.qt.io/qt-5/qloggingcategory.html

but even the doc for qCDebug() is a bit iffy on the matter. First stating

QLoggingCategory category("driver.usb");
qCDebug(category) << "a debug message";

Note: Arguments are not processed if debug output for the category is not enabled, so do not rely on any side effects.

Then stating

QLoggingCategory category("driver.usb");
qCDebug(category, "a debug message logged into category %s", category.categoryName());

Note: Arguments might not be processed if debug output for the category is not enabled, so do not rely on any side effects.

So, either they didn’t manage to disable the logging category or it executes everything and throws away the output.

While the qC stuff was nice, it came a bit late since most shops already had to have their own classes to interface with syslog on embedded targets.

Let’s just remove Console so applications get created correctly from the start.

This AGILE thing is really bringing down the embedded world. No System Architecture Document created up front. No Architect participating in code review prior to check-in. All of the Architecture “user stories” pushed to the deepest recesses of the backlog in a false hope they can just be ignored.

It’s also causing a real problem for clients looking to obtain Qt consultants. They are flooded with people who only know JavaScript and possibly enough C++ to compile “Hello World!”. One, I guess they are former client now, has a very successful product I helped them develop using Qt and embedded Linux who has now abandoned Qt and even embedded Linux because of this. They are actually talking about performing a field update to thousands of devices in I don’t know just how many countries so they don’t have to support Qt anymore. Such a roll out is no small effort nor is it cheap. Several others are talking about the same thing.

Lowering the bar was _not_ a good idea and AGILE has failed industry wide. You just can’t prove your project is a failure because there is never anything in writing about what it was __supposed__ to do. Everybody gets a ribbon just for showing up.

Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++/Qt touchscreen/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the "Zinc It!" book series for John Gordon Burke Publisher, Inc.

A decade later he released a massive (nearly 800 pages) tome "The Minimum You Need to Know to Be an OpenVMS Application Developer" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there "The Minimum You Need to Know" book series was born.

Three years later he wrote his first novel "Infinite Exposure" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of "The Earth That Was" trilogy:
Infinite Exposure
Lesedi - The Greatest Lie Ever Told
John Smith - Last Known Survivor of the Microsoft Wars

When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.