Blog Archives

Write Elegant Loops Using Loop Invariants

February 1, 2018
By
Write Elegant Loops Using Loop Invariants

Writing loops is an essential part of programming, but writing elegant loops is not easy. For example, in an interview Linus showed a commonly used piece of code which delete an entry in a link list (we will discuss this example). The task was simple but the loop in the solution was ugly.

Read more »

Learning from Requests Source Code

June 7, 2016
By

Requests (https://github.com/kennethreitz/requests) is a popular http request handling package. Its code is supposed to be well written and pythonic. So I decided to learn from it and improve my Python programming. Here is something that I learned or re-learned.

Read more »

Comparing IO Performance of C++, Python(CPython) and Pypy

May 8, 2016
By
Comparing IO Performance of C++, Python(CPython) and Pypy

Simple, access files with the same IO patterns but different languages (C++, Python) and see the difference.

Read more »

Why I fart? (or how small data changes life)

April 30, 2016
By
Why I fart? (or how small data changes life)

I have had gas problem for quite a while. Usually, right after I have lunch, gas starts to accumulate in my belly. Then comes the fart. It was really annoying, especially when you sat in the front row of a class. Sometimes it was even painful as there are too much gas in the belly that somehow couldn’t get...

Read more »

My Approach To Reproducible Research

June 22, 2015
By

The goal is simple. During my research, I often need to run a lot of different workloads, plot the results and write some analysis text. My goal is to: find out parameters I used to generate the results. So I can answer questions “why I see an outlier in my figure?” find out the script that I used to...

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)