Dependent Origination

Archive for September 2013

using A::B;

will result in the title-error when compiling, if B is also a namespace.

Try using namespace A::B instead.

I googled around but then just realized what I should do when I want to, say, print the content of an unordered_map based on its keys:

unordered_map<int, int> counts;

map<int, int> ordered(counts.begin(), counts.end());

for(auto it = ordered.begin(0; it != ordered.end(); it++) {

output it


for some reason, probably due to the fact that i learned stl from examples, not really its implementation details (though I have spent quite some time reading about effective c++ a few times a few years later), it is very slow to dawn on me that stl::map is in fact a red-black tree that is sorted on its keys. that fact has always needed to come to me.

I got a request that the reporting weekly email is missing numbers from its users. Turned out a few days’ logs are missing in the system. I checked the cron jobs and cron running system that the sync of logs should be fine — I have manually run the sync logs scripts and it is working out fine too.

What is the problem that these syncing didn’t happen for the past few days?

From talking to other people, we realized here is what is going on. Our cron running system will run all executable scripts in a directory based on its frequency requirement (per directory). It could be the scripts before the one I need are having problems. We checked the first script using the cron log system. Nothing. Then the second script. Turned out it has been hanging for all these few days — all the cron processes are still there in the system and they couldn’t make progress at all. This is because the script needs to access some production machines but the production setup (dns service etc) has been changed in the past few days.

Solution is instead of saving files to a certain machine in production, we are uploading to s3. That way it will have nothing to do with future production upgrades.

Quite a cool experience when figured out, starting with so much confusion 🙂

August is better than expectation. Work is a bit mad, but that is only after i volunteered to help a colleague, since i have observed stress from him. I almost thought I couldn’t finish what i promised to deliver for him the day before long weekend. And was secretly thinking if i didn’t volunteer i wouldn’t have so much stress before the long weekend. Good thing is everything worked fine, finished earlier than I thought. So all ends well.

August began with a disappointment, which even the hubby had to deal with it. It was the first time that I saw he behaved like he had something to work with in terms of managing expectations. You can really see that repeated disappointments do take their toll upon people’s mental state. That is a bit sad but true. No one can be a forever spring of optimism, at least in a short amount of time. Some people can recover. Others don’t. Resilience is a precious quality to have, and I heard it is in the genes.

My then-only session with Buddhism 101 ended well. I hope they realized the greatness of the material 🙂 Teaching is a talent business. Either you have it or you don’t. You might still end up being a good teacher even, but never a great one. Never a teacher that inspires your audience. I had great materials and ideas that I wanted to get across and I hope I did justice to them. Otherwise it wouldn’t be so good a karma as it should be 🙂

That same weekend my college classmate sent a wechat message announcing to the class that she was visiting the bay area and meeting up with another classmate who recently moved to the bay area due to company acquisition by yahoo and she welcomed everyone to join it. I didn’t reply after I saw it. I have no problem meeting up her but I don’t exactly want to meet up with the other one, who a few weeks before the acquisition became news, tried to manipulate me to stay in my house apparently for the following months. I let her stay the night despite the manipulation but refused her further manipulation trying to stay continuously in the future. I thought about replying on Monday saying aiya I didn’t see the message until now and therefore excused myself from the meeting. I decided against it since that makes me becoming the bitch who I try to avoid contact. I felt good that weekend — by this age I think I deserve to enjoy myself and stay away from people or things that I don’t like — and I felt good because I hold up my own rule. That was a really relaxing weekend 🙂

My interest in stock market is really up high recently. I have been selling my holdings lately and so far the portfolio actually grew over the month of August despite the decline of indices. Might be first time I have beaten an index, for god’s sake! 🙂 But we shall see if anything I am doing right is repeatable for September/October, which should be the most interesting months for stock market this year. Wish me luck 🙂

September 2013
« Aug   Oct »


  • is reflecting on the past three years and reading the article on divided self aptly showing up at the top of my tweeter feed. 1 week ago
  • is having a nice feeling of connecting dots all over the place. they are now illuminating the same point. 2 months ago
  • Style Transfer is fun! TensorFlow rocks! #WTM17 3 months ago
  • couldn't get over the jetlag, sleeping during the day from seven to four, for days. 5 months ago
  • is emptying trash and happily discovering the available disk space now ranks at 100G+. 6 months ago

Flickr Photos











More Photos