Standard Search
About 9 results
https://rednafi.com/go/sort-slice/ · 22 Mar 2025
Compare three Go slice sorting methods: sort.Interface, sort.Slice with closures, and modern generic slices.Sort with type safety.
https://rednafi.com/go/nil-interface-comparison/ · 12 Mar 2025
Debug tricky nil comparisons in Go interfaces. Understand dynamic types, type assertions, and use reflect for generic nil checking.
https://rednafi.com/go/slice-gotchas/ · 6 Feb 2025
Avoid common Go slice mistakes: shared backing arrays, nil vs empty slices, append behavior, and slice copying pitfalls explained.
https://rednafi.com/go/topological-sort/ · 13 Oct 2024
Implement topological sorting in Go to order tasks by dependencies. Process directed acyclic graphs for build systems and scheduling.
https://rednafi.com/go/type-assertion-vs-type-switches/ · 31 Jan 2024
Master Go type assertions with i.(T) syntax and type switches. Extract concrete types from interfaces safely with ok idiom examples.
https://rednafi.com/misc/associative-arrays-in-bash/ · 3 May 2023
Learn how to use associative arrays in Bash to create key-value pairs, mimic dictionaries, and manage complex data structures in shell scripts.
https://rednafi.com/system/random-choice-in-sqlite/ · 2 Sep 2022
Emulate Python's random.choice in SQLite using JSON arrays and the random() function. Populate tables with realistic test data efficiently.
https://rednafi.com/python/preallocated-list/ · 27 Mar 2022
Understand CPython list memory allocation: how lists store pointer references, grow dynamically, and when pre-allocation with [None]*n helps.
https://rednafi.com/python/mixins/ · 3 Jul 2020
Build custom data structures with Python's collection.abc mixins, abstract base classes, and interfaces for dict-like and set-like objects.