boost::lambda

Computer programmers are designed to see patterns everywhere; we discover the systems that underly processes and phenomena for the advantage of our software. Usually, the same watchful eye that looks for patterns in shipping routes also looks for routine in his/her own work. The evolution of languages is a direct consequence of those observations. As it became clear that programs were oriented around data structures with associated functions, OOP was born. C++ is evolving. Slowly. By committee. But the fellows at the Boost project are making artful use of template meta programming, operator overloading, and general trickery to bring the advances of modern, dynamic languages into the statically checked world of C++. Cheers.

So, you just got started with C.

C++ STL introduces vectors.

…and iterators.

…and some hideous ways to do simple things.

Boost makes it easy.

And powerful.

Google Calendar Retrieve Events for Additional Calendars

I’ve been experimenting with an idea that mergers Remember the Milk (RTM) and Google Calendar. Problem is, their APIs are a bit less documented than I originally expected. No matter, the internet to the rescue!

Google calendar provides some pretty neat examples for how to login and retrieve all the events on your default calendar, but neglects to mention additional private calendars under your account. The distinction, which isn’t documented, is that when you create additional calendars they are not actually assigned your username but instead get a unique username so they can migrate between user accounts. Secondly, while you can authenticate yourself for private events on your own calendar, you can’t authenticate against this new username. This has two implications:

1) Username/password authentication won’t work (we’ll use magic cookie).
2) The private event feed requires a unique key.

Thus what was formerly:

Becomes:

As far as I can tell, the private key can only be accessed from within the “Calendar Properties” inside of Google Calendar. Additionally, if you copy and paste the result, you will end up with an HTML-escaped @ (%40). Be sure to replace this with an @, otherwise you’ll get an invalid user ID.

Hopefully this helps! Comment with any questions and I’ll try to answer them.