Friday, June 22, 2012

Plain C with RAII idiom

One day I was pushed into situation that I must write in pure old-scool plain C. Nova days, modern C++ is sky-rocketing with Standards Comittee initiatives but cross-platform development is another world. So you have to forget templates, Boost and even STL. But most painful for me as "clean code" adept was RAII absence: no wrapper classes, no auto-generated cleanup in scope epilog etc... But with some trade-off in mind, you can get RAII then!

Thursday, January 26, 2012

Live like you were web.config

Question: what is the most interesting ingredient of a web project’s code generated by Visual Studio? I can bet the first thing you named is “web.config” magic. Wonderful file which can auto-adjust its content according to debug/release build mode, pretty good example of XSLT power enhanced with some internals of Visual Studio... And one day you can quiz yourself with that question: how to do like web.config? How to introduce your own set of files and auto-adjust them according to debug/release/whatever? Let’s give a try...