OpenCV: The art of using the KISS and YAGNI principles.

As programmers, we’re often tempted to leverage design patterns, language idioms, advanced language features, and well-known libraries, which is certainly advisable. However, it’s essential to put on the KISS/YAGNI glasses before diving into these techniques 🙂

Continue reading “OpenCV: The art of using the KISS and YAGNI principles.”

Why should you consider using the C++ POCO library?

The POCO C++ Libraries (POCO stands for “Portable Components”) is a collection of open-source C++ class libraries that simplify and accelerate the development of network-centric, portable applications in C++. These libraries provide a wealth of features, ranging from HTTP and HTTPS clients and servers, to XML parsing, to data encryption, to threading support, and much more.

We’ve relied on the POCO library for over 15 years to verify whether CppDepend accurately evaluates well-implemented projects. Therefore, this assessment is not drawn from a fleeting encounter with the library but from a thorough analysis of its many versions over the past 15 years.

Continue reading “Why should you consider using the C++ POCO library?”

C++ always comes to the rescue for challenging problems: the llamafile case study is a prime example.

C++ has been instrumental in resolving numerous challenging problems across various domains due to its efficiency, performance, and versatility. Some of the challenging problems resolved by C++ include:

  1. System Software Development: C++ has been extensively used in developing system software such as operating systems (e.g., Windows, Linux), device drivers, and embedded systems due to its low-level capabilities and ability to interact closely with hardware.
  2. Game Development: C++ is widely employed in the game development industry to create high-performance and resource-efficient games. Its ability to manage memory and provide low-level access to hardware makes it suitable for developing game engines and graphics-intensive applications.
  3. High-Performance Computing: C++ is a preferred choice for developing high-performance computing applications, including simulations, scientific computing, and numerical analysis. Its ability to optimize code for speed and efficiency allows for faster execution of complex algorithms.
  4. Financial Systems: C++ is commonly used in developing financial systems and trading platforms due to its speed and reliability. It is crucial in building algorithmic trading systems, risk management software, and market analysis tools.
  5. Networking and Telecommunications: C++ is utilized in networking and telecommunications for building efficient network protocols, routers, and communication software. Its ability to handle low-level network operations and optimize network performance makes it invaluable in this domain.
Continue reading “C++ always comes to the rescue for challenging problems: the llamafile case study is a prime example.”

Testing if the newcomer Llama3 is beneficial for c++ developers

AI has become prevalent in various domains, including software development. Many developers leverage generative AI to aid them in coding. Let’s explore the newcomer Llama3 and assess its suitability for C++ developers.

Related to Meta here’s a brief description of Llama3:

Our new 8B and 70B parameter Llama 3 models are a major leap over Llama 2 and establish a new state-of-the-art for LLM models at those scales. Thanks to improvements in pretraining and post-training, our pretrained and instruction-fine-tuned models are the best models existing today at the 8B and 70B parameter scale. Improvements in our post-training procedures substantially reduced false refusal rates, improved alignment, and increased diversity in model responses. We also saw greatly improved capabilities like reasoning, code generation, and instruction following making Llama 3 more steerable.

Certain developers may lack interest in AI generative tools due to their perception that the results are not yet mature. This sentiment is particularly pronounced among expert developers who swiftly identify areas for improvement in generated code. Nonetheless, I believe that for the majority of developers, generated code could serve as a valuable starting point for implementation, refactoring, or explanation purposes.

Continue reading “Testing if the newcomer Llama3 is beneficial for c++ developers”

The single C++ line that is worth millions of dollars.

Many developers has already heard about the Ariane5 bug , it was one of the most infamous software failures in the history of aerospace engineering. It occurred on June 4, 1996, during the maiden flight of the Ariane 5 rocket, which was intended to launch four Cluster satellites into orbit to study Earth’s magnetosphere.

The bug itself was a software issue related to the guidance system of the rocket. The software component responsible for converting a 64-bit floating-point value to a 16-bit signed integer for use in the guidance system caused an unhandled exception due to an overflow error. So finally one line of code costs millions of dollars and make the Ariane 5 launch is widely acknowledged as one of the most expensive software failures in history.

But in the other side do you know which line of code worth million of dollars?

Continue reading “The single C++ line that is worth millions of dollars.”

Be prepared to work soon with a C++ agent.

Perhaps within two years or even sooner, developers could find themselves having a conversation like this:

“Which C++ agent are you utilizing?”

“I’m using the X agent.”

“And does it contribute to cleaner code with fewer bugs?”

“Yes, it’s fantastic! My C++ code has been modernized.”

“What about the application design?”

“My agent has been trained to implement design patterns. Additionally, I’ve provided it with training data to incorporate the best C++ idioms.”

So why are we quickly approaching a future where humans collaborate with agents to accomplish our tasks? Because major players in AI are pushing for the rapid release of AI agents.

AI agents, also known as intelligent agents, are software entities that perceive their environment and take actions to achieve specific goals. These agents are a fundamental concept in artificial intelligence and are widely used in various applications, ranging from simple automation tasks to complex decision-making systems. Here are some key points about AI agents:

Continue reading “Be prepared to work soon with a C++ agent.”

The new C++ standards must anticipate the coming AI tsunami.

The significant and rapid transformation driven by advancements in artificial intelligence (AI) technology promise a very big AI tsunami that will change our life as developers. While the exact nature of these changes can vary depending on context and perspective, there are several broad trends and potential impacts that might be expected following such a transformative event:

Continue reading “The new C++ standards must anticipate the coming AI tsunami.”

C++ creator rebuts White House warning, but there’s no smoke without fire :)

In a March 15 response to an inquiry from InfoWorld, Stroustrup pointed out strengths of C++. “I find it surprising that the writers of those government documents seem oblivious of the strengths of contemporary C++ and the efforts to provide strong safety guarantees,” Stroustrup said. 

And Stroustrup cited a fact about the origin of the issue :

There are two problems related to safety. Of the billions of lines of C++, few completely follow modern guidelines, and peoples’ notions of which aspects of safety are important differ.

This highlights a significant problem with C++. When any programming language permits the execution of potentially harmful actions, it shouldn’t come as a surprise that a considerable portion of developers may misuse it.

And when confronted about writing bad code, developers may offer various arguments to justify their actions, though these are often excuses rather than valid reasons:

Continue reading “C++ creator rebuts White House warning, but there’s no smoke without fire :)”

What attempts have been made to bring memory safety to C++?

C++ is a powerful and widely used programming language known for its flexibility and performance. However, one of its historical drawbacks has been the lack of built-in memory safety features, which can lead to various types of memory-related bugs such as buffer overflows, dangling pointers, and memory leaks.

This is a known issue that has persisted for decades, and numerous attempts have been made to find a solution. Unfortunately, none have succeeded.

What has been done in the past to enhance memory safety within the language?

Continue reading “What attempts have been made to bring memory safety to C++?”