Skip to content

Blog — page 15

664 posts on software development, newest first. Browse by topic:Rust, Go, Python, JavaScript & web, AI & data, DevOps & tooling, Mobile & Android, .NET & C#, C++ & systems, LaTeX, Investing, Everything else.

  1. RustBuild a command-line weather app in Rust with reqwest and OpenWeatherMapA small Rust CLI that looks up current weather by city name from the OpenWeatherMap API, using reqwest's blocking client and serde for JSON.
  2. RustReading and writing CSV files in C++ with ifstream and ofstreamRead a CSV file line by line in C++, split fields correctly (including quoted commas), add a computed column and write the result to a new file.
  3. RustReading, filtering, sorting and writing CSV files in RustUse the csv and serde crates to read a CSV file into Rust structs, filter and sort the rows, and write the result to a new CSV file.
  4. RustEstimating pi with threads in Rust using the Monte Carlo methodSplit a Monte Carlo estimate of pi across std::thread workers, collect results through JoinHandle, and compare with sharing state via Arc and Mutex.
  5. RustCounting words in Rust with HashMap, HashSet and BTreeMapBuild a word-frequency counter in Rust with HashMap's entry API, find unique words with HashSet, and get sorted output with BTreeMap or a sorted Vec.
  6. RustRust borrowing rules by example: averaging a Vec through a shared referenceA small Rust program that reads integers from stdin and averages them through a borrowed slice, showing shared and mutable borrows and the compile error you get when they overlap.
  7. RustRust lifetimes: why a struct can't borrow from its own fieldRust lifetimes through one example: a struct holding strings and references to them, why it won't compile, and two designs that do.
  8. .NET & C#Polyglot Notebooks review: sharing data between C# and F# cellsMy take on Polyglot Notebooks after writing a book with them, with an example that reads a CSV in C# and charts it in F# with Plotly.NET.
  9. C++ & systemsC++ performance optimization: compiler flags, profiling, memory and cache-friendly codePractical ways to make C++ faster: optimization flags and PGO, profiling before changing code, avoiding allocations, cache-friendly layouts and parallel algorithms.
  10. RustWebAssembly with Emscripten: compile C to wasm and call it from JavaScriptInstall Emscripten, compile a small C program to WebAssembly, run it in the browser, and call an exported C function from JavaScript with cwrap.
  11. AI & dataSeaborn basics: statistical plots from pandas DataFramesHow to make scatter, distribution, categorical and correlation plots with Seaborn 0.13, plus the figure-level vs axes-level split that trips people up.
  12. JavaScript & webFive ways to add search to a website: Algolia, Fuse.js, Google, PHP and PagefindWorking examples of site search with Algolia, Fuse.js in React, Google Programmable Search, a PHP and MySQL query, and Pagefind for static sites.

© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)