Category Archives: Programming

Solving Cyclic Dependencies Is Hard

I am a C/C++ beginner but I’d been already taught that dependency cycles are generally evil since it’s very hard to solve. I haven’t realized how hard the problem is before, because all the works I’ve done are “one file” … Continue reading

Posted in Linux, Programming | Tagged | 1 Comment

Peter’s Comment on Concurrency

“Concurrent program in a single processor computer will only make it slower than its sequential counterpart, but we are looking into the future, so let’s write concurrent programs.” – Peter A. Buhr

Posted in Programming | Tagged | Leave a comment

Autoboxing Makes Java Be 99% Object-Oriented

I remember that back to the early age when I was first beginning to learn the Java programming language, there was a famous quote (in China): Java is a 95% object-oriented programming language.. Why was it? Because Java has primitive … Continue reading

Posted in Programming | Tagged | Leave a comment

Circular Linked List Problem

How to determine a linked list has a cycle without marking any nodes? This is a classical interview question and one of my friend brought it to me. When I came across the question, I thought that we might count … Continue reading

Posted in Programming | Tagged | Leave a comment

Weird Hex Output

In C++, to output and integer in hex, I’d been taught to do this: cout << hex << an_integer; And if I want to show “0x” before the value, I need to do the following: cout.setf(ios::showbase); cout << hex << … Continue reading

Posted in Programming | Tagged | Leave a comment