May 17th, 2008
Some time ago, I started writing simple casual game - tetris
Idea of a game is nearly the same age as me, but I decided to create a 3D variation of it.
At the begining every game look like a crap, so does mine.

Disaster
My workshop and some technical info:
- Operating system - Linux, it also smoothly works on Windows
- Programming language: C++
- Libraries used: OpenGL, nVidia Cg, boost, SDL, GLee, FreeType, FmodEx, id3lib
- IDE: Eclipse CDT and Vim
- Other tools: Blender, GIMP
April 30th, 2008
There is another pseudo-register useful when working with C# language:
$exception
It contains last exception that is thrown by an application.
Suppose that we have code like this:
C#:
try
{
// something
}
catch
{
// do something else
}
with $exception pseudo-register you can easily examine it:

April 12th, 2008
I found a very interesting feature of Visual Studio's debugger. It's been there for a long time but many developers do not know (including me) that pseudo-registers can be helpful.
There are more registers but I will mention just two of them.
@ERR
Well, it returns the same as GetLastError(), It optionally can return formatted string - just write it like @err,hr
I think I don't need to add more, screens below are self-explanatory


$user
Provides many informations about a user executing current process

Happy debugging.
February 19th, 2008
I have written another tiny tool which helps me in every-day work.
Look at the projects page.
January 31st, 2008
Sometimes a programmer must do very weird things in his ASP.NET webapp. Among them, there is a postback initiated in custom javascript. Before .NET Framework 2.0, it was no good solution to achieve it. Fortunately it can be done without much effort nowadays.
There is an interface called IPostBackEventHandler which must be implemented by a page or a control. Then you must create javascript containing reference to postback function retrieved by ClientScriptManager.GetPostBackEventReference(...) method.
The sample web control's codebehind can look like below:
C#:
public class MyControl : Control, IPostBackEventHandler
{
// this method will be called on postback initiated in javascript
public void RaisePostBackEvent(string eventArgument)
{
if (eventArgument == "foo")
{
// do something
}
}
}
then we create javascript in aspx / ascx file:
ASP:
<script>
function Test()
{
<%= Page.ClientScript.GetPostBackEventReference(this, "foo"); %>
}
</script>
Now, when a Test() function is called in a browser, our page will do a nice, clean postback 