Making it happen
Archive for November, 2005
Page heap
Nov 30th
Another way of catching the errors early is enabling the page heap for a specific executable. You must download the debugging tools then run gflags.exe, choose an executable and then “enable page heap”. This will somehow force each allocation block to be a memory page and the forbidden memory zones will be protected by the operation system. However obviously, this will have very negative performance impact on the allocation system.
Catching all exceptions
Nov 30th
In case that you didn’t know this – you can force some exceptions to be caught by the Visual C++ debugger before your program does that i.e. with the try / catch blocks. For doing this enter debugging then go to “Debug / Exceptions” and put 0xc0000005 and 0xe06d7363 to “Stop always”.
Project management flow
Nov 29th
I was thinking at structuring the activities on a project into a flow and presenting it visually – however also with a large level of details. For example, one task may result in a deliverable and some bugs that go to the developer and then again to the testing team and so on. Also all the tasks go into a project deliverable that goes to the client and so on – you get the idea. With a bit of hacking you can have this project view generated automatically (assuming you already have project management tools for bug-tracking, task management).
Monitor tuning
Nov 28th
With Powerstrip I’ve managed to increase the refresh rate of my monitor beyond of the specified limit of 85 Hz (at 1152×864) to 95 – and it’s clearly a difference, my eyes don’t hurt anymore. The only downside is that the image can’t stretch to the whole screen area, rather it will be slightly smaller (having it sized to the whole area is not accepted by the display).
IT Manager Game
Nov 25th
Code obfuscation methods
Nov 21st
Nice guidelines – be very careful following them !
. via Slashdot.
How to retrieve Euler angles from quaternions
Nov 18th
Well, the formulas that I’ve found were unusable: if you create a
quaternion with yaw, pitch and roll of 45 and then call ToEulerAngles
you’d get different results – and this is unacceptable. Now – the
solution I’ve found involves transforming the rotated system of the
quaternion back to the inital system.
Initially you extract the x
axis, y axis and z axis from the quaternion – let’s call them x’, y’
and z’. Then you get the yaw (by atan2 of y’.y and y’.x or something
like that) and then rotate the system (all of the axis) by -yaw around
z axis (the axis around yaw is). So you’ll end up with y’ aligned with
y. Then you get the pitch and rotate with -pitch, and then you do the
same with the roll – and now you can verify (assert) that x’ = x (i.e.
1, 0, 0), y’=y and z’=z – just to be sure.
That’s it – now you have
the yaw, roll and pitch. Of course, in the beginning you have to decide
what which angle represents (i.e. z points up, yaw is around it, etc).
Cell phone modding
Nov 16th
In the spirit of modding your devices – what about modding your mobile phone? Well, not that crap stuff like replacing leds with pink ones as some people do. So – I’m thinking of tweaking the processor speed, changing the camera lens with some high-quality ones and maybe adding a label as the Nokia fashion phones have. As for the mods I know – I remember about a phone modded as a night vision cam (with an infra-red flashlight), pretty cool but not so useful.
3d Mesh rounding
Nov 16th
As I couldn’t find any simple algorithm, I decided to get a brand new one. The problem is to smooth the mesh i.e. starting from a cube to round its corners until in the end you get a sphere. So – moving nodes along the normal direction appeared to do it – however it’s not that good when concave surfaces are used (because the new faces may intersect and so on). Currently I’m thinking to define one segment per point – to specify where it is allowed to move so it doesn’t intersect with another point that’s also moved. It’s not finished though.
