"For every word I’ve written, five have been discarded. Such is the nature of writing. For every ten
programs I’ve downloaded, tried, and tested, nine have been discarded. Such is the nature of software."
(c) Steven Goodwin
Saturday, May 11, 2013
The nature of me
Thursday, May 9, 2013
Visual Studio 2012 Pro cannot build your solution because of XAML
You have a large enough project (in my case it is about 2 Gigabytes of sources, libs etc. etc. oh, yeah, baby... although it results in just 33 Mb 'release' executable) written in XAML/C++ for Windows 8 Metro.
Suddenly from some point you cannot build it. There are errors in Output something like:
"The specified module could not be found. (Exception from HRESULT: 0x8007007E) your_path\your_project\FuckingPage.xaml 18 13 YourSolution",
"Cannot create instance of type 'YourSolution.Common.YourClass' your_path\your_project\FuckingPage.xaml 30 25 YourSolution" etc.
If this is a case, don't rush to dive into debugger or even figure out what's going wrong. Most likely there is not your mistake at all. Just close before the compilation all opened tabs containing fuckin' XAML files.
Nice, isn't? :)
"The specified module could not be found. (Exception from HRESULT: 0x8007007E) your_path\your_project\FuckingPage.xaml 18 13 YourSolution",
"Cannot create instance of type 'YourSolution.Common.YourClass' your_path\your_project\FuckingPage.xaml 30 25 YourSolution" etc.
If this is a case, don't rush to dive into debugger or even figure out what's going wrong. Most likely there is not your mistake at all. Just close before the compilation all opened tabs containing fuckin' XAML files.
Nice, isn't? :)
C structures and memory consumption
Hack to death on your nose: when you declare a structure in C, the bigger data types must go at first. For example:
struct S {
long double ld;
char *p; // can be 8 bytes on x64
double d;
float f;
int i;
char c;
} *p;
But not:
struct S {
char c;
int i;
float f;
double d;
char *p;
long double ld;
} *p;
I guess the same rule is valid not only for C.
Monday, May 6, 2013
Bit Twiddling
int conditional(int x, int y, int z) {
return x ? y : x;
}
int conditional(int x, int y, int z) {
return ((y&(!x+~0))|(z&~(!x+~0)));
}
WARNING: latter is worse not only because it is unreadable, but it also results the worst assembler code (at least in case of the modern compilers). So be careful by using such shit which you can find in some "clever" books and articles :)
Как я провёл лето
Как я провёл "длинные" майские выходные в 2013 году. Надоело писать не по-русски :)
Мда-с. Давненько не брал в руки GDB, Valgrind etc. и не хакал дизассемблированный код. Ощущения непередаваемые, жаль только, что это всё в выходные вместо отдыха. Ну, пара новых прочтенных на аглицком книжек (одна - по Аде, вторая - по компиляторам) да три-четыре статьи - почти не в счёт. Выходные удались, в общем. Хотя домашние меня, кажется, уже тихо ненавидят :(
Планы на следующие "длинные" выходные: примерно такие же, но с упором на Фортран.
Всё просто: физически не могу смотреть, как все дороги области забиваются придурками на дешевых ино-пипках российско-казахской сборки, как они, мучительно добравшись, наконец, до какого-нибудь лесочка, в котором они ещё не срали, тут же разводят костры, развешивают по кустам полиэтиленовые пакеты, рубят молодняк и непременно врубают на всю катушку "не ссы ты мне на раны..." и так далее всячески любят природу.
Мда-с. Давненько не брал в руки GDB, Valgrind etc. и не хакал дизассемблированный код. Ощущения непередаваемые, жаль только, что это всё в выходные вместо отдыха. Ну, пара новых прочтенных на аглицком книжек (одна - по Аде, вторая - по компиляторам) да три-четыре статьи - почти не в счёт. Выходные удались, в общем. Хотя домашние меня, кажется, уже тихо ненавидят :(
Планы на следующие "длинные" выходные: примерно такие же, но с упором на Фортран.
Всё просто: физически не могу смотреть, как все дороги области забиваются придурками на дешевых ино-пипках российско-казахской сборки, как они, мучительно добравшись, наконец, до какого-нибудь лесочка, в котором они ещё не срали, тут же разводят костры, развешивают по кустам полиэтиленовые пакеты, рубят молодняк и непременно врубают на всю катушку "не ссы ты мне на раны..." и так далее всячески любят природу.
Saturday, April 27, 2013
God save the testers
Testers: "Bug report. It is too dark at night and the user can't see anything. Please see the attached screenshot. Assigned to Lord."
Lord: "I tried to reproduce this issue using cats, owls, bats and gentlemen in black velvet too. Cannot reproduce. Closed as 'By Design'."
Testers: "Reopened. Then it seems to be reasonable to show some warning to the user in the evening or even better to turn the user into a cat or an owl. Priority changed to not critical but must be fixed to the next release."
Lord: "Assignee changed to Lucifer. Btw I don't know the next release date."
Monday, April 8, 2013
Very special software for very special users
The MAC users will never know which date, month and year is today. They are completely happy with their half-apple of knowledge about what day of the week is today.
Friday, April 5, 2013
Wednesday, March 27, 2013
JavaScript sux again?
document.execCommand("delete", false.null); will be OK at least in MSIE 10
(attention to the dot between second and third PARAMETERS)
(attention to the dot between second and third PARAMETERS)
Subscribe to:
Posts (Atom)