// (Ghetto trace) (Trace in an hostile environment) | |
#include <stdlib.h> | |
#define UU_TRACE_BEGIN | |
#define UU_TRACE_END | |
#if defined (_WIN32) | |
extern "C" { | |
__declspec(dllimport) unsigned long __stdcall GetCurrentProcessId(void); | |
void __stdcall OutputDebugStringA(_In_opt_ char const *outputString); | |
__declspec(dllimport) int _snprintf( char* buffer, size_t buf_size, const char* format, ... ); | |
} |
Good results in software engineering depend on robust decisions over the trade-offs involved in solving problems with computing devices. This can only be done through a good understanding of the problem being presented, and the context/platform that will support its resolution. Technical choices should not be elevated above that.
Note that both the problem and the platform’s definition should not only consist of inanimate objects. Both always incorporate human elements that must be understood.
By nature, engineering therefore involves learning, knowledge formation, skill development and acquisition.
#pragma once | |
/* @language: c11 */ | |
#include <stddef.h> | |
#include <stdint.h> | |
#if defined(__cplusplus) | |
#define ARRAY_ALIGNAS alignas(8) | |
#else |
// Atan approximation | |
// https://www.dsprelated.com/showarticle/1052.php#tabs1-comments | |
#include <math.h> | |
#include <stdio.h> | |
double atan_approx(double z) | |
{ | |
double m = z<0? -1.0:1.0; | |
z *= m; |
#!/usr/bin/env bash | |
export C_INCLUDE_PATH=/usr/local/include/libusb-1.0 | |
export LIBRARY_PATH=/usr/local/lib | |
(O=canoscan ; cc canoscan_unit.c -o "${O}" -lusb-1.0 && printf "PROGRAM\t%s\n" "${O}") |
Techniques of persuasion.
Has had a bad rap throughout ages. Appears necessary in democratic societies. Preserved under authoritarian systems for justice and theology, and for elite groups. In western republic democracies, mainly practiced by professional politicians (elective nobility) and lawyers. Porosity between the two groups.
More and more essential in the companies that want to emphasize group problem solving and collaboration. Practiced without knowing it, in a dry style, by engineers via their communications and documentations.
Skill
- Magic/Mysterium. In classical times it was clear that it takes time to develop know-how. Practice. Initiation. Hence roles of schools as safe space for learning and practice.
- Eloquence
@url: https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
pub fn cpuCount(fallback_allocator: *mem.Allocator) CpuCountError!usize {
switch (builtin.os) {
builtin.Os.macosx => {
var count: c_int = undefined;
var count_len: usize = @sizeOf(c_int);
Some useful code written in ion
#include "SDL2.framework/Headers/SDL.h" | |
#define sdl2_guard(__expr) \ | |
if ((__expr) != 0) { \ | |
fprintf(stderr, "SDL Error: '%s'\n", SDL_GetError()); \ | |
assert(0); \ | |
} | |
#include <assert.h> |