This week in Beads language development was devote...
# two-minute-week
e
This week in Beads language development was devoted to implementing code coverage measurement. In Beads you have the concept of a monitor program that can run another program inside a window. This is useful for performance analysis and automated testing. I expanded the Builder program to have a toggle switch which shows the number of times each function/subroutine in the system has been called. By identifying functions with 0 calls you can see which parts of your code have not been tested.

https://youtu.be/rW3H_BR7gLk

This counts are also useful for identifying super high frequency utility functions, as those are strong candidates for putting in time on performance. It is always better to measure frequency of use before trying to optimize your code.
👍 6
k
Your coverage graph shows some nodes with horizontal stripes, some with vertical stripes, and some with both. Does that have any significance?
e
@Kartik Agaram In Beads, a program consists of a declaration phase, and then a series of code chunks. Each chunk is prefixed by its purpose. There are drawing blocks of various kinds, and then plain computational blocks (which are just simple functions in other languages). There are horizontal slice/scroll chunks, vertical slice/scroll chunks, grid chunks, and freeform drawing chunks each of which is a green box, and then computational blocks are represented by circles. The icons are a hint as to the purpose of that chunk of code. Drawing blocks carry a graphical context, an implied DPI and variables.
❤️ 1
🍰 1