Skip to content

Instantly share code, notes, and snippets.

@LukeGary462
LukeGary462 / foreach_test.c
Created March 7, 2023 21:23
C foreach macro implementation
// test
// https://paiza.io/projects/gckklFp-m9gy5nT3pGsFKw
// stack overflow source
// https://stackoverflow.com/questions/400951/does-c-have-a-foreach-loop-construct
#include <stdio.h>
#include <stdint.h>
#define COUNTOF(x) (sizeof(x) / sizeof(x[0]))
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active December 7, 2025 22:58
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).