Category Archives: Algorithm

The build is broken! How much time do we waste?

Continuous Integration (CI) encourages frequent code commit as opposed to running extensive QA process before merging the work to the trunk. I like Continuous Integration because the code changes are visible to everyone immediately. If someone makes a mistake, we … Continue reading

Posted in Algorithm, Statistics | Tagged , , , | Leave a comment

Shuffling an array

In-Place swapping is a common way to shuffle an array. However, it’s easy to make an implementation mistake. When the size of the array is N, there are N! permutations. The goal is, after the shuffling operation, each permutation shall … Continue reading

Posted in Algorithm | Tagged , , | Leave a comment

Base64 encoder (C++)

Base64 encoder is used to convert any binary data into “printable” character sequence so that it can be carried over textual protocols such as XML. Here is a simple function to get base64 text out of byte buffer based on … Continue reading

Posted in Algorithm, C++ | Tagged | 1 Comment

How many tests shall we run?

As many as possible, of course. However, as I discussed in the previous post, we don’t have to run all the test to estimate the overall success rate. It’s useful especially for release scheduling. You can get the automation test … Continue reading

Posted in Algorithm, Tips | Tagged , , , | Leave a comment

Statistics of partial test cases run

In software development, the number of test cases is increased dramatically especially when you generate the test cases automatically. It becomes a problem when the execution time of the test suites is the bottle neck of the development.¬†For example, assume … Continue reading

Posted in Algorithm, Tips | Tagged , , | 1 Comment

How does arithmetic coding compress data?

Though I knew that arithmetic coding is a compression algorithm and "better than Huffman coding", I did not know how it can make data smaller. Now, I finally understand it! The basic idea is same as Huffman coding. Use fewer … Continue reading

Posted in Algorithm | Leave a comment