The best job at GoogleRecently, I came across two things I would call "Easter Eggs" in Google. The first happened while I was researching Cordyceps to add some facts to my review of Last of Us. I noticed that Google lets y…René Fischer·Dec 31·4 min readFollowTILblogbusinessdelightful
Preventing accidental struct copies in GoPrevent dangerous struct copies with noCopy sentinel and go vet's copylock checker. Protect mutexes and sync primitives from value copies.Redowan Delowar·Apr 21·4 min readFollowGoTILConcurrency
Go 1.24's "tool" directivePin tool versions in Go 1.24 with the new 'tool' directive. Replace tools.go pattern with native go.mod support for project tooling.Redowan Delowar·Apr 13·4 min readFollowGoTILDevOps
Capturing console output in Go testsTest functions that write to stdout/stderr in Go by capturing output with os.Pipe. Learn patterns to avoid deadlocks in concurrent tests.Redowan Delowar·Apr 12·4 min readFollowGoTestingTIL
Why does Go's io.Reader have such a weird signature?Understand why io.Reader takes a byte slice parameter instead of returning one. Learn about heap allocations and buffer reuse in Go streams.Redowan Delowar·Feb 8·3 min readFollowGoTILPerformance
Dynamic shell variablesLearn variable indirection in Bash with ${!var} syntax. Build context-aware configs, function dispatch, and dynamic variable name resolution.Redowan Delowar·Jan 11·3 min readFollowShellUnixTILCLI
Injecting Pytest fixtures without cluttering test signaturesClean up pytest test signatures using @pytest.mark.usefixtures to inject implicit fixtures without autouse or unused parameter warnings.Redowan Delowar·Dec 2·2 min readFollowPythonTILPytestTesting
Explicit method overriding with @typing.overrideCatch method override errors at type-check time with Python's @override decorator from PEP 698, preventing typos and signature mismatches.Redowan Delowar·Nov 6·2 min readFollowPythonTILTyping
Quicker startup with module-level __getattr__Speed up Python module imports with __getattr__ from PEP 562 for lazy loading, deprecation warnings, and dynamic attribute access.Redowan Delowar·Nov 3·3 min readFollowPythonTILPerformance
Docker mount revisitedMaster Docker mount types: volumes, bind mounts, tmpfs, and build cache. Clear syntax comparison between -v and --mount options with docker-compose.Redowan Delowar·Oct 22·5 min readFollowTILDockerDevOps
Discovering direnvAutomate environment variables per directory with direnv. Load .envrc files on entry, unload on exit. Integrate with Python venv and uv workflow.Redowan Delowar·Oct 2·6 min readFollowTILShellUnixCLI
Bash namerefs for dynamic variable referencingMaster Bash namerefs with declare -n to create dynamic variable references. Build generic functions for arrays and associative arrays without eval.Redowan Delowar·Sep 20·5 min readFollowShellUnixTILCLI
Shades of testing HTTP requests in PythonTest HTTP requests in Python with pytest-httpx for full mocking, respx for pattern matching, or VCR.py for recording real responses.Redowan Delowar·Sep 2·3 min readFollowPythonAPITestingTIL
Taming parametrize with pytest.paramWrite readable parametrized tests with pytest.param for better test names, conditional skips, custom IDs, and structured test data.Redowan Delowar·Aug 28·2 min readFollowPythonTestingTILPytest
HTTP requests via /dev/tcpMake raw HTTP requests with Bash's /dev/tcp file descriptor. Build health check scripts without curl or wget using TCP socket connections.Redowan Delowar·Aug 8·2 min readFollowTILShellUnixNetworking
The *nix install commandReplace mkdir, cp, and chmod with a single install command. Copy files, create directories, and set permissions in one step with GNU coreutils.Redowan Delowar·Jul 28·2 min readFollowShellUnixTILCLI
TypeIs does what I thought TypeGuard would do in PythonUnderstand TypeIs vs TypeGuard in Python: TypeIs provides more intuitive type narrowing by narrowing both positive and negative branches.Redowan Delowar·Apr 27·4 min readFollowPythonTypingTIL
Strategy pattern in GoReplace inheritance with the Strategy pattern in Go using interfaces. Achieve composable, testable code without class hierarchies.Redowan Delowar·Feb 17·5 min readFollowGoTILDesign Patterns
Retry function in GoBuild retry logic in Go without reflection using generics. Implement exponential backoff and configurable retry strategies with type safety.Redowan Delowar·Feb 4·3 min readFollowGoTILError Handling
Type assertion vs type switches in GoMaster Go type assertions with i.(T) syntax and type switches. Extract concrete types from interfaces safely with ok idiom examples.Redowan Delowar·Jan 31·5 min readFollowGoTILData Structures
Patching pydantic settings in pytestMock pydantic_settings in pytest tests by patching the settings class to prevent flaky tests from environment variable dependencies.Redowan Delowar·Jan 27·4 min readFollowPythonTILTestingPytest
Omitting dev dependencies in Go binariesTrack dev dependencies like golangci-lint in go.mod with a tools.go file and build tags to exclude them from production binaries.Redowan Delowar·Jan 21·3 min readFollowGoTILDevOps
Annotating args and kwargs in PythonProperly annotate Python *args and **kwargs with heterogeneous types using Unpack, TypedDict, and modern type hints from PEP-692.Redowan Delowar·Jan 8·3 min readFollowPythonTypingTIL
Statically enforcing frozen data classes in PythonEnforce immutable dataclasses at type-check time with @final decorator to catch mutations before runtime without frozen=True performance cost.Redowan Delowar·Jan 4·3 min readFollowPythonTILTyping
Debugging dockerized Python apps in VSCodeSet up VSCode debugger for containerized Python applications using debugpy. Step-by-step guide with Docker Compose and launch configurations.Redowan Delowar·Dec 22·4 min readFollowPythonTILDocker
Dotfile stewardship for the indolentManage dotfiles across devices with GNU Stow. Symlink configuration files from git repo to home directory with simple, idempotent commands.Redowan Delowar·Sep 27·4 min readFollowShellUnixTILCLI
Self-hosted Google Fonts in HugoHost Google Fonts locally in Hugo without CDN dependency. Download woff2 files, configure CSS, and improve performance while maintaining GDPR compliance.Redowan Delowar·Sep 14·2 min readFollowTILHugoWeb
Dummy load balancer in a single Go scriptBuild a working round-robin load balancer in Go with goroutines and the standard library. No dependencies needed for this educational prototype.Redowan Delowar·Aug 30·5 min readFollowGoTILNetworking
Limit goroutines with buffered channelsControl goroutine concurrency with buffered channels as semaphores. Prevent resource exhaustion with backpressure patterns in Go workers.Redowan Delowar·Aug 23·4 min readFollowGoTILConcurrency
Writing a TOTP client in GoBuild a TOTP-based 2FA client in Go using the standard library. Generate time-based one-time passwords like Google Authenticator.Redowan Delowar·Aug 20·3 min readFollowGoTILSecurity
Interface guards in GoUse compile-time interface guards to verify type conformity in Go without runtime overhead. Learn the var _ Interface = (*Type)(nil) pattern.Redowan Delowar·Aug 18·2 min readFollowGoTILAPI
Go structured logging with slogMaster Go 1.21's log/slog package for structured logging with levels, JSON output, and attribute grouping. No third-party libraries needed.Redowan Delowar·Aug 10·7 min readFollowGoTILLogging
Taming conditionals with bitmasksReplace complex nested conditionals with Python's enum.Flag and bitmasks for cleaner, more maintainable logic using bitwise operations.Redowan Delowar·Jul 29·8 min readFollowPythonTIL
Using DNS record to share text dataShare data via DNS TXT records using dig and base64 encoding. Learn limitations, security concerns, and practical use cases for DNS tunneling.Redowan Delowar·Jul 17·2 min readFollowShellUnixTILNetworking
Memory leakage in Python descriptorsPrevent memory leaks in Python descriptors by using weakref to avoid hard references that prevent garbage collection of validated objects.Redowan Delowar·Jul 16·4 min readFollowPythonTILPerformance
Unix-style pipelining with Python's subprocess moduleBuild Unix-style command pipelines in Python using subprocess.run with stdout piping for efficient process chaining and output capture.Redowan Delowar·Jul 14·5 min readFollowPythonTILShellUnix
Enabling repeatable lazy iterations in PythonCreate reusable generators by implementing __iter__ in a class, allowing multiple lazy iterations without memory overhead or repeated function calls.Redowan Delowar·Jul 13·3 min readFollowTILPython
Associative arrays in BashLearn how to use associative arrays in Bash to create key-value pairs, mimic dictionaries, and manage complex data structures in shell scripts.Redowan Delowar·May 3·4 min readFollowShellUnixTILData Structures
Process substitution in BashUse process substitution <() to treat command output as files in Bash. Compare directories, process data, and avoid temporary files with this technique.Redowan Delowar·Apr 30·6 min readFollowShellUnixTIL
Dynamic menu with select statement in BashBuild interactive CLI menus with Bash select statement. Create user-friendly command-line tools with option selection and function dispatch.Redowan Delowar·Apr 29·3 min readFollowShellUnixTILCLI