nicolas @ uucidl

micros, a playground for demos

December 1, 2013 by nicolas, tagged programming, filed under tools

A little modern playground for writing demos against OSX or Windows, with an emphasis on making it possible to collaborate easily between multiple individuals.

The build system is self-contained, it enforces a strict coding standard with warnings all activated and automatically formatting the code for you.

It standardizes on C++11 and OpenGL 3.2 and targets Darwin/OSX past 10.7 (Lion) and NT/Windows 7 and beyond.

It’s all on github ready to be forked or downloaded

Fork it, and compose your demo inside src/. Start with main.cpp to get an idea.

The runtime will be improved later with some non-essential convenience code for demo making and also user interaction & packaging, which you’ll be able to incorporate within your own repo as long as you’re willing to rebase to upstream, and don’t modify the runtime or build system too much.

The runtime’s API is voluntarily minimalistic, otherwise you would use the APIs directly.

Trace Event Profiling with chrome://tracing and SPDR

March 14, 2013 by nicolas, tagged programming, filed under tools

Knowing more about my code has been a part-time obsession for a couple of years now both at work and outside. Can you really improve what you cannot measure or even visualize?

After some months I had settled with monitoring a certain number of variables in a HTML/Javascript page hosted inside my programs, using the mongoose http server.

However this article from August 2012 made me reconsider writing my own visualization console.

Furthermore, I value very much reusing APIs / protocols (when reusing implementations is not necessary or even needed) and so the trace event profiling API outlined there gave me the needed push to start my own implementation, whose first version I am releasing today: uu.spdr-v0.1.0

It is called SPDR, and allow you to label sections of your code, track the evolution of values with minimum overhead, and importantly in a format compatible with Google’s trace viewer, which almost every one has at their desk in the form of chrome.

The SPDR library is lightweight, compiles for Windows, OS X and POSIX platforms. It is designed to not allocate more memory than you want to use, and supports concurrent traces.

Google’s trace viewer code is also available standalone, which should make it easy to embed in your app.