Write code that is easy to delete and debug

Write code that is easy to delete and debug  
 
Simple code for debugging is code that does not fool you. It is more difficult to debug code with hidden behavior, with poor error handling, with uncertainties, insufficiently or excessively structured, or in the process of changing. In fairly large projects, you eventually encounter a code that you can not understand.
 
 
If the project is relatively old, then you can find code that you forgot about, and if it were not for the commits, you would have sworn that you did not write these lines. As the project grows, it becomes more difficult to remember what the different pieces of code are doing. And ...
+ 0 -

STM32 + NetBeans =?

STM32 + NetBeans =?

 
As you know, compatibility with GNU tools and GDB support make almost any popular development environment suitable for debugging a wide range of embedded platforms, mostly free of charge and legally. In theory.
 
 
What happens in practice when trying to make friends STM32 and NetBeans, and is it possible in principle to get a workable system with support for the newest stones - under the cut.
 
 
Spoiler [/b]
Yes. But no.
setup guide. . The main difference was only in the OS (Linux against Win7 x64 for me)...
+ 0 -

Guide to Assembler Go

Guide to Assembler Go  
 
Before implementing the implementation of runtime and learning the standard library, you need to master the abstract assembler Go. I hope this guide will help you quickly master the necessary knowledge.
 
"Pseudo-assembler"
 
Decomposition of a simple program
 
 
Let's analyze add
 
Analyzing the main
 
 
A couple of words about gorutins, stacks and partitions
 
 
Stacks
 
...
+ 0 -

Antipatterns testing software

Antipatterns testing software

Introduction


 
There are several articles on the antipatterns of software development. But most of them talk about the details at the code level and focus on a specific technology or programming language.
 
 
In this article, I want to take a step back and list the high-level antipattern testing common to all. I hope you will learn some of them regardless of the programming language.
 
 

Terminology


 
Unfortunately, the testing has not yet developed a common terminology. If you ask a hundred developers what the difference between an integration, cross-sectional and component test is, you'll ...[/h][/h]
+ 0 -

Logging as a way to debug the code

Why so it is important forbid self-debugging with your hands?
 
 
When you debug a program, you yourself, without realizing it, think that for one debugging session, fix all the problems that have arisen in the framework of this task. But our shortsightedness does not want to believe that in fact there is not one problem, but several. And for one debug session it will not be possible to solve all these problems.
 
 
Therefore, you will need to run this code several times in debug mode, spending hours debugging over the same piece of code. And it's only you alone spent so much time on this ...
+ 0 -

About memory leak in one server application

About memory leak in one server application  
 
After reading this note, you will find out what you went through after the unexpected leak of memory of the server application in the FreeBSD OS. What modern means of detecting such problems exist in this environment and why the most powerful of them can be completely useless in the crooked hands .
 
roll the updates , when it will take in head and, in addition, restart the machine. A couple of months ago, so many services collapsed on a neighboring project.
 
someone is conducting a targeted network attack causing an overflow;
 
MeltdownSpectre. Yes! Yes, of course. I do not ...
+ 0 -

How we broke Ceph

 
How we broke Ceph  
 
Detective in 1 part.
 
This story happened in October.
 
 
There is Ceph version ??? (Hammer). 6 storages, 8 monitors, 6-8 osd on each storage, SSDs ranging from 1 TB to 4 TB. Replica - ? at least 1.
 
 
Once it happened: in the evening a storm passed through the whole cluster and spontaneously restarted a lot of osd. In the osd logs, we saw standard errors for ceph of the form no reply from osd.X . A few slow requests and spontaneous restarts that for ceph is not a critical event and quite frequent. In general, it happens. But, unfortunately, not all the restarted osd were able to rise...
+ 0 -

Debugging multithreaded programs based on FreeRTOS

Debugging multithreaded programs based on FreeRTOS

 
Debugging multitasking programs is not easy, especially if you are faced with this for the first time. After the joy of launching the first task or the first demo of the program, from the infinitely disturbing observation of the LEDs, each of which blinks in its own task, the time comes when you realize that you understand very little ( , You do not get at all ) about what is actually happening. Classics of the genre: "I allocated 3KB to the operating system and launched only 3 tasks with a 128B stack, and for the fourth time, for some reason, there is not enough memory" or "How many stacks should ...
+ 0 -

Why does the Heap32Next () function work so slowly on Windows 7?

If you are doing system programming under Windows, you might notice that is very useful. Heap32First / Heap32Next and others from the same family began to work much slower starting with Windows 7. What happened to them?
 
 
Let's move to the distant 1992. Developed Windows 3.1. One of the new components in it was ToolHelp. He allowed a little digging inside the core of the OS. For us, the most interesting functions in it are those that allow you to view data in the heap. Because Windows 3.1 used cooperative multitasking ...
+ 0 -

Change management

Change management
 
For some time now my colleagues and I have been struggling to optimize the process of change management. We have already achieved some successes, but there is (in the first place, project managers) a very strong feeling that all this is not enough.
 
 
Project: The platform product is finalized by the engineers according to the requirements of the buyers. We have pieces of iron, so we also have production (assembly) of the many components that we order from third-party suppliers.
 
 
What is a Change? Our product has a Platform: a basic device for which all requirements of the buyer and his infrastructure ...
+ 0 -