Guides for programming and sysadmin.
Pick a topic and start reading.
Browse by topic
Pick a topic.
C++ (68 guides)
Modern C++ guides: C++20 and C++23 features, compilers, build systems, and measured performance.
Rust (6 guides)
Rust guides: async runtimes and embedded targets, with what actually runs under QEMU.
Go (27 guides)
Go guides: concurrency and testing, including the failure modes the compiler will not catch.
Python (54 guides)
Python guides: typing and packaging in real workspaces. The migration traps, in the order they bite.
TypeScript (1 guide)
TypeScript guides: strict-mode migrations across major versions, with the error counts.
Sysadmin (50 guides)
Linux systems work, measured: systemd, nginx, logrotate, containers, and the command line.
Latest guides
The newest guides, newest first.
-
Fix C++ "request for member in pointer type" — Use -> on Pointers, and Why -> Cannot Fix a Non-Class Type C++
The GCC error request for member in a pointer type means the dot operator was used on a pointer: dot requires an object of class type, arrow requires a pointer to class type and is exactly equivalent to dereferencing first. This guide reproduces the dot-on-pointer failure and GCC's maybe you meant to use '->' suggestion, fixes it with the arrow and with the parenthesized dereference form, shows why the unparenthesized star form fails on precedence, covers the sibling non-class type error where the pointee has no members and arrow does not help, and ends with references and std::unique_ptr, where dot and arrow both compile but reach different objects.
-
Fix C++ "no match for 'operator<<'" — Streaming a User-Defined Type and a std::vector of It to std::cout C++
Streaming a user-defined type to std::cout fails with no match for 'operator<<' because std::basic_ostream provides overloads only for built-in types, character data, and a few library types. This guide reads the exact GCC error, fixes it with a non-member operator<< taking (std::ostream&, const T&) and returning std::ostream& so chaining works, shows the friend-defined-inside-class form for private members, adds a separate overload for a std::vector of the type, and shows why a non-const reference parameter breaks streaming of const objects.
-
Fix C++ "invalid conversion from 'const char*' to 'char*'" — Add const, Copy the Text, or Own It in std::string C++
The GCC error invalid conversion from 'const char*' to 'char*' means read-only text was handed to code that claims the right to modify it: a string literal, a const char* variable, or the result of c_str() was assigned to a char* or passed to a char* parameter. This guide reproduces the error in all three forms, explains why GCC reports the literal form with different wording and only as a warning by default, and gives the four correct fixes in order: declare const char* when nothing writes, copy into a local char array when a callee really writes, store the text in std::string and use data() when it must be owned and mutable, and reserve const_cast for the one narrow legacy case where the underlying object is genuinely mutable.
-
Fix C++ "'cout' was not declared in this scope" — Missing
, Missing std::, and the using namespace std Trade-Off C++The error 'cout' was not declared in this scope has two different causes with the same first line: no
included at all, or included but cout used without std:: qualification, because std::cout lives in namespace std and its name is not injected into the global scope. This guide reproduces both failures with GCC, reads the did-you-mean suggestion that only the second failure earns, fixes both with std::cout, covers std::endl versus a newline character, shows the using namespace std form and why it stays out of headers, and ends with the wrong-header trap where provides std::printf but not std::cout. -
Fix C++ "cannot convert 'std::string' to 'const char*'" — c_str(), data(), and When the API Wants char* C++
Passing a std::string where a const char* is expected fails because there is no implicit conversion from std::string to a character pointer. This guide reads the exact GCC error at a real std::fopen call, fixes it with c_str() for read-only APIs, shows why c_str() still fails for a char* parameter while data() on a non-const string works since C++17, and states the invalidation rule that ends the useful life of every pointer these functions return.
-
Fix Go "panic: runtime error: slice bounds out of range" — A High Bound Past Capacity, a Low Bound Past the High Bound, a Full Slice Expression Past Capacity, a String Past Its Length, and a Negative Bound Go
Go panics with slice bounds out of range when a slice expression's bounds break the rule for its form. For a simple slice expression on a slice, the bounds must satisfy 0 <= low <= high <= cap; on an array or a string the high bound is judged against the length instead. A full slice expression must satisfy 0 <= low <= high <= max <= cap. The panic text names the bounds that failed and the capacity or length they were judged against: [:5] with capacity 3, [3:1] with no limit named, [::5] with capacity 3, [:8] with length 5 for a string, and [-1:] for a negative low bound. A constant negative bound never reaches run time, because the compiler rejects it. This guide reproduces each shape exactly as Go 1.26.4 prints it and gives the bounds check that keeps each shape from reaching the panic.
-
Fix Go "panic: sync: negative WaitGroup counter" — Extra Done Calls, Add(-1) Past Zero, and the Add-Before-Go Rule Go
A sync.WaitGroup counter that goes negative panics with panic: sync: negative WaitGroup counter, and every route to it is a counting mismatch: one Done too many, an Add with a negative delta that overshoots zero, a Done on a WaitGroup that was never Added to, or a shared completion callback that fires twice. Done is exactly Add(-1), so the panic names Add in its stack trace even when your code only called Done. The ordering rules prevent the rest: a positive Add when the counter is zero must happen before Wait, Add calls belong before the go statement that creates the work, a reused WaitGroup takes new Add calls only after every previous Wait has returned, and WaitGroup.Go, available since Go 1.25, does the Add and the Done for you so the pair cannot drift apart. Each shape here is reproduced exactly as Go 1.26.4 prints it.
-
Fix Go "panic: runtime error: makeslice: len out of range" — Negative Length, Length Past Capacity, and Sizes That Overflow Go
A slice length that is negative, larger than its capacity, or so large that the runtime cannot allocate it makes make panic at the call itself: panic: runtime error: makeslice: len out of range when the length is the problem, and panic: runtime error: makeslice: cap out of range when the capacity is. The rule underneath both messages is one line: at every moment 0 <= len(s) <= cap(s), and a make that would break it never returns a slice at all. Constants that break the rule never even build — a constant negative length and constant length and capacity in the wrong order are compile errors — while the same values arriving in variables build fine and panic at run time. That split is why this panic survives testing: the numbers that trigger it usually come from input, from a count read off a wire, or from arithmetic that overflowed on the way to the make call. The fixes are all upstream of make: validate any length or capacity that came from outside the program, check size arithmetic for overflow before it reaches make, grow with append instead of pre-sizing from an untrusted number, and cap any preallocation hint at a sane bound. Each shape here is reproduced exactly as Go 1.26.4 prints it, with the check that prevents it.
Tools
Small checkers and verifiers that run in your browser. Paste input, get a verdict — no sign-up, no upload.
systemd Unit Checker
Paste a [Service] section and get a plain-language verdict on every sandboxing setting it finds.
sshd_config Verifier
Paste sshd -G output and get a hardening verdict on the values your server actually runs.
Sanitizer Report Decoder
Paste an AddressSanitizer, UBSan, or ThreadSanitizer report and get the bug, the file and line, and the fix.
nginx Server-Block Auditor
Paste a server block and get WebSocket, TLS, HSTS, and proxy-header verdicts, each tied to the nginx.org reference.
OnCalendar Validator
Paste a systemd timer expression and get the specific reason it fails and its normalized form, plus the past-date traps the built-in check hides.
Sudoers Config Checker
Paste a sudoers file or sudoers.d drop-in and get a per-line verdict before it ever touches /etc/sudoers.