Notes of Elements of Modern C++ Style
Notes of Sutter’s Elements of Modern C++ Style.
Everything uncategorized
Notes of Sutter’s Elements of Modern C++ Style.
Notes of the High Integrity C++ Coding Standard by PRQA. These notes are by no means exhaustive. (Sometimes I feel HIC++ is pretty paranoid.)
It is probably best to explain how to use Python’s Queue.task_done method from digging into ThreadPoolExecutor.
I wrote a script for checking out dependeicies and then building FFmpeg that basically just follows the steps outlined here. Why? Because automation is cool!
I use debootstrap and this helper script.
Say you just wrote a shining new Python package that you would like to submit to PyPI. Here are some pitfalls you might step on.
How to make a “smart” module that its attributes are generated during runtime?
Python is great at introspecting itself. But could a function introspectively know its caller? Answer: Yes, at least for CPython.
If an object is constructed in one thread and used in another, could another thread sees uninitialized or partially initialized states of the object? Answer: No.
When evaluating a serialization format, how easy it is to evolve schemas (adding new fields, etc.) is as important as storage compactness and encoding/decoding performance, but is often overlooked.
Java 8 introduces lambda expression, allowing non-verbose, no-memory-leak functional programming.
You choose to live with the extra complexity of asynchronous I/O (aka event-driven) almost always only for scaling up the number of concurrent connections.
Science published a review of poker solver algorithm.
Rust is like C++ designed by Haskell programmers. For full reference, see here.
LevelDB is a sorted key-value storage library that implements LSM-Tree algorithm.
Ninja is a bare-metal build system, conceptually similar to Make. It is intended to be generate by a meta-build system (think of assembly code generated by a compiler from a high-level language).
Python metaclass is a mechanism for customizing class creation.
Google Java style defines some hard-and-fast rules, no non-enforceable advices.
Go’s error handling is like a Hollywood blockbuster plus an unnecessary and dumb sequel.
WSGI is a low-level interface between web servers (also called a gateway) and web applications (also called a framework).
tl;dr Use Wire Protobuf and don’t use Google’s Nano Protobuf.
Using enum in both languages is usually preferred than a group of named int constants.
Group docker commands into categories.
YAML is simple and human-readable, but surprises you at unwelcome places when used as a configuration file format.
API keys, passwords, etc. How do we store and pass these data to our cloud service?
A short reference of new Python 3 features.
Thanks to the augmented arithmetic assignments methods, x += y is not equivalent to x = x + y.
TL;DR it is broken as of July 7, 2014.
I followed the Gentoo x86 Chroot Setup Guide. Here are my notes/deviations of setup a chroot on Ubuntu.
Open and initialize a resource in one method may leak the resource.