C++ lambdas as Brian Will's code blocks

Back 10 years ago, Brian Will made a series of YouTube videos on various practical issues in programming. In a video about OOP, he pointed out that a well-structured long procedure can be more readable and maintainable than a bunch of objects, and suggested a "use code block" language feature that works as "an anonymous function that does not see anything in its enclosing scope" and helps to better express the logic of a procedure by structuring its name space. Very similar scoping rules apply to C++ lambdas that were introduced in the 2011 standard. This post takes a look at how lambdas can make long procedures more readable and expressive.
#c++

Likely in C++

Attribute [[likely]] is a good minimal example of how software can leverage processor features to achieve maximum performance by providing more information about the program to the compiler. This post shows an example how [[likely]] affects compiled machine code, discusses how it improves utilisation of CPU branch predictors, and brings up a couple topics in C++ program design where it is useful.
#c++#cpu#performance

Bus Pirate 3.6 and I2C

"The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff." An excellent tool. The post puts together a couple basics of how Bus Pirate 3.6 works and how to talk to an I2C bus with it. As an example, how to read the ID register 0xD0 of the barometric sensor BMP280 from Bosch. Bus Pirate v3.6
#electronics#tools

A visit to DESY Hamburg

Quite productive week in a workshop on building the future ATLAS ITk Strips detector DESY team
#physics#Germany

Concise example of a CMake library package

A quick example of a minimal CMake project with an app and a library sub-project. Part 1 in a series of basic CMake templates.
#cmake

Clustering CMake graphs

Making CMake codemodel graphs more readable by clustering dependency edges.
#cmake#software#tools

Possible in words

Words can contain any logic.
#comments#logic

AI Silver Bullet

The popular promise of AI is to give everyone a silver bullet for exactly the problem they don't want to deal with. Tech companies can do tech and forget about "starting with the customer" and culture things. The AI customers can forget about dealing with the complexity of their software, which is one of its fundamental problems. "A silver bullet for everyone" must be a common promise in hypes.
#AI#software

Pop up a full image in Web

3 ways to open a full image:

Switzerland is a land of clouds.

Switzerland is a land of clouds. Switzerland in clouds

RSS feed