Skip to content

Instantly share code, notes, and snippets.

@uucidl
uucidl / 00_ProfilingAndDataAnalysisInSoftware.org
Last active August 23, 2024 15:21
Profiling and data analysis resources

Goals

Looking at software from a different angle as done during profiling and data analysis has numerous benefits. It requires and increases our understanding of the problems being solved by the software. It exposes us to unexpected discoveries and insights. It allows us to suggest improvements.

Since there is a great element of skills involved, and it is rarely taught in Computer Science degrees, the role of practice is very important to gain the necessary skills.

Exercises

Ex1: sequential processing

@uucidl
uucidl / 00_the-problem-with-UI.org
Last active May 3, 2024 22:38
The Problem Of UI (User Interfaces)

Links

Note: a lot of programmers talk about UI without mentionning the user even once, as if it was entirely a programming problem. I wonder what we’re leaving off the table when we do that.

@uucidl
uucidl / ibbq-thermometer-protocol.md
Last active August 27, 2023 22:21
ibbq-thermometer-protocol

Example devices

  • Inkbird IBT-2X
  • Inkbird IBT-4XS
  • EasyBBQ FCCID: FCC ID 2AI4MPRO3 (SHENZHEN HYPERSYNES CO.,LTD Smart Wireless Thermometer PRO3)

Properties

  • @ConnectTimeout: 60 seconds
  • @BatteryPollingInterval: 5 minutes

The iBBQ is a Bluetooth LE Gatt Device

@uucidl
uucidl / 10x editor tips.org
Created August 7, 2023 07:29
Tips for using 10x

How to have diffent color scheme by project / repository / workspace

This makes it possible to work on multiple workspaces in parallel of the same project without confusing yourself as to which is which.

Each workspace can have its own 10x_settings file. Simply name it after the workspace name, adding the .10x_settings extension. In there you can customize the color scheme setting. And voila, you have a different color scheme for every workspace you load.

@uucidl
uucidl / adl_barrier_idiom.cpp
Last active April 9, 2023 03:10
ADL Barrier Idiom
// What you do when you want to prevent ADL from kicking in, and force your
// users to use fully qualified names.
namespace module
{
struct Foo { int a, b; }; // struct defined in one namespace
namespace functions
{
void Flaggerbify(Foo* foo); // function defined in another
@uucidl
uucidl / APL style trees in C.md
Last active March 13, 2023 20:27
Representing trees not with noodly pointers, but as parallel arrays.
#define case(__x__) break; case __x__
#define fallthrough(__x__) case __x__
#define otherwise break; default
#include <assert.h>
#include <stdio.h>
int main(int argc, char **argv) {
switch(argc) {
case(0): printf("surprising\n");
@uucidl
uucidl / 000-eop
Last active December 7, 2022 11:15
Elements Of Programming (Stepanov, Mc Jones) In Rust
Elements Of Programming (A.Stepanov, P.McJones) implemented in Rust
Generic programming Rust using traits and generic functions
@uucidl
uucidl / compilation_times.md
Last active November 6, 2022 12:08
Notes about compilation time

When building programs with user interfaces*, there are parts that cannot be tested formally with either types or automated tests, because they require a human to test how things "feel."

In that context, long compile times lengthen the build-evaluate feedback loop to a point that harms quality.

  • also note that APIs are user interfaces. So this harms way more than just programs with GUIs.

@url: https://www.youtube.com/watch?v=dnz6y5U0tFs Here he find it normal to build 1M loc of scheme code in 16minutes. "respectable compile time" (It used to be 4min!)

@url: tool by Aras https://github.com/aras-p/ClangBuildAnalyzer

@uucidl
uucidl / 00-notes-about-APIs.org
Last active October 18, 2022 09:14
Notes about APIs

On the emergence of interfaces

Interfaces naturally emerge as software gets broken down into parts communicating with one another. The larger and more deliberate structures emerge from a deliberate attempt to organize the development process itself. [fn:Liskov2008] Structure often emerge directly from division of labor: as teams take on independent tasks, interfaces are established betweeen domains they become responsible for. (Conway’s Law)

Software developers are responsible for systems built out of very small atoms while ultimately performing tasks for their users of a much greater magnitude. Dijkstra showed this by computing the ratio between grains of time at the lowest and largest atoms of the system (from say, CPU instructions to a human interaction with the system) The span was already quite large by Dijkstra’s time, of about 10^9. Today this ratio would be at least above 10^12 (see grain ratios)

This large span has to be manage