Ben Chuanlong Du's Blog

It is never too late to learn.

English Vocabulary

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. beneficiary

  2. perfunctory

Alike

  1. bimonthly vs semimonthly

  2. every one vs everyone, every thing vs everything, etc.

  3. numeric vs numerical

Culture

chicken: white meant -> breast, dark meat -> leg

Easy-Made Mistake with C++ Iterator

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

the wrong way

for(auto it=l.cbegin(); it!=l.cend(); ++it){
    for(auto jt=++it; jt!=l.cend(); ++jt){
        cout << *it << " <-> " << *jt << endl;
    }
}

it is increased again in the inner …

Statistics

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. in real problems, the true value of (some quantity) are usually unknow/defined, even if we can collect data about it, e.g., Amazon goods, what is the true cost of …

Bayesian vs Frequentist

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. 很多frequentist的inference是基于大样本(近似)理论的,这种情况下样本小的时候Bayesian结论可能会更好。

  2. 某些统计量实在太复杂,(近 …

Immutable String vs Mutable String

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

advantage of immutable string:

trivially thread safe
    more secure
        more memory efficient in most use cases.
            cheap substrings (tokenizing and slicing)

however, if one has to create many small string, e …

Enumeration in Java

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. You can associate values with enumeration elements.