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...

Sunday, July 17, 2011

Different pre-build and post-build event scripts in C#


Custom build events are like a bucket of water – you don’t need one until you get some fire around. In most cases it is not necessary to do something special, for example, before or after your project is built. So that events are not widely known but they should, at least to tackle it properly in case of fire in your project. Luckily, this skill is not tough stuff.