понедельник, 30 июня 2014 г.

I-bike-novgorod ride

So, this saturday I participate in bike ride on Day of Youth. We've visited three monasteries and ride about 60 km. The really nice part of ride was an excursion: nice lady told us about every monastery and about people, connected with it. It always nice to hear something new about a place you live in.

Weather was nice, so take few shots.

вторник, 29 апреля 2014 г.

Новгород-Лаппеэнранта на одну ночь с велосипедом

Внезапно в четверг я понял, что надо съездить в Финляндию на велосипеде. Причём в связи с ДНЖН ехать надо бюджетно. Беглый поиск по картам и блогам показал, что проще всего доехать до Выборга и оттуда каким-то образом попасть в Финляндию. Можно на общественном транспорте до Светогорска, можно на велотакси до Светогорска или до Брусничного, можно самому пилить куда пожелаешь хоть от самого Питера. Последний вариант показался наиболее привлекательным, однако, пилить в начале сезона  лишние 140 км я не рискнул. В результате всех этих метаний возник такой план.
6.15 -- 9.30 "Ласточкой" до Санкт-Петербурга
9.40 -- 11.20 своим ходом от Московского вокзала до Финляндского
11.30 -- 13.00 скорым поездом до Выборга
13.10 -- 17.00 неспешно своим ходом в Лаппеэнранту.

понедельник, 13 января 2014 г.

CppCat

CppCat -- extension for Microsoft Visual Studio. We have only linux-based projects, but we ususally build it in MS Visual Studio just for checking compability and search for possible bugs. With this tool it became much easier. We have a lot of legacy code, so it helps us to fix it. We've found a LOT of hidden issues.

The only problem for me is that cppcat isn't always expand macro in correct way. For example, in legacy code we have switch/case statement divided in macros.

#define BEGIN_DECLARATION() switch (id) {
#define caseatr(n, at, extif) case n: /*removed code*/

#define END_DECLARATION() default: /*removed code*/ }

With following use:
BEGIN_DECLARATION();
caseatr(0, vendor_id, omccver >= G984_4_2004 );
caseatr(1, version, omccver >= G984_4_2004 );
END_DECLARATION();

Cppcat understand that first macro is begining of switch, but do not understand that all following macros is cases.

Of course, it's nothing to compare with all threats we've found thanks to it.

Update
As Andrey pointed out analyzer warns that there is "extra" semicolon. It's still correct code, but it might be wrong. So, warning is correct and macro expanding either correct.