Welcome to Hardcode Sign in | Join | Help

September 2005 - Posts

There's a tremendous improvement in the OpenGL pipeline if you minimize the state changes i.e. calls to glMaterialfv, glColor3f and so on. Could it be due to latencies on the AGP bus ? Although it's hard to imagine that the driver doesn't use a buffer for sending data to the video card. Maybe such commands trigger precomputing some internal structures ? Again, hard to believe that.
I had a crash today when using VBOs, immediately after a glBufferDataARB. The crash was in ati2dvag.sys (the ATI display driver) and afterwards either VPU Recover saved my working session or it hanged for good. I traced the problem to the fact that I submitted 0-length buffers for texture coords, even if I had TEXTURE_2D enabled. Strangely indeed, because the driver should have stored the buffer length and forbid access beyond it.
Here's a bug I've seen today. We had the following code:

HRESULT get_Value( VARIANT* pValue)
{
*pValue = m_vValue; // m_vValue is _variant_t
}

Now, we hoped m_vValue will get copied to *pValue, however it doesn't. Actually it gets copied, but member-copy only, so if you have the variant as VT_BSTR the string won't have its contents copied but only a pointer to it. Now, the correct code is:

VariantCopy( pValue, &m_vValue);

In my opinion it's the still best guide for running your IT company, even if it's written in 2001. You can download the book in PDF from here.

Software is an easy business to get into, but it is a tough business to make money at.
....
Every company is different. Every company needs its own strategic and operating plan,
that the management team has developed together, but deviating from the precepts in this
document has often proven costly to companies that I have observed.

I managed to fix the blog's rendering in Firefox, if anyone needs the patched style.css for this .Text skin feel free to get it from your browser's cache or by saving this page. Didn't improve my knowledge of CSS, I've just replaced a height with a padding. More on Firefox quirks while displaying this blog here.
My next hack into this blog software is to implement a mini-rss reader so displaying "NEW" if there's anything unread in the linked blogs (bottom-left) (well not quite RSS reader but I really want it to announce me when someone has posted).
While not quite revolutionary stuff, because it's based on Javascript and XML that have been around for ages, it's still not popularized as it should be. My opinion is that it should be tied to (pluged-in?) Visual Studio .Net for example, that including some changes in the HTML editor (so double-click on a button open the client handler), and a transparent framework for using client-side script to access some (all?) variables on the corresponding server page (synchronized with ... another xml-generating page let's say).
Anyone interested in coding these ?
Why is Microsoft Windows stuck with 8-chars file names ? Is this legacy code from windows 3.1 (they could have at least performed a mapping to the real DLLs like Microsoft.Visual.Basic.Virtual.Machine.6.0.dll), but the .net framework has mscorlib.dll that's 8 chars also.
What are the steps for transparently converting a VB component to a Visual C++ one (no, not to .NET for the moment) ?
- Start an ATL project
- Create the corresponding object classes, remove their default interfaces
- For each object, implement its VB interface (using the Class View's "Implement Interface...")
- Implement the functionality
- In the end, replace all the classids and progids with the ones from the VB component
What about an API to Yahoo Messenger ? Implemented using an injected DLL and exposing a COM interface - it would be pretty neat I say.
I heard some time ago of some software that performed inter-process communication using database access - so I propose a contest to the weirdest idea of communication between a process and another. My suggestion is to use text files for that :).
VALVe rocks again: "The Lost Coast" adds HDR into their "Source" engine - it looks stunning and works with anti-aliasing too, even on SM2 hardware. And they somehow managed to get Paul Debevec helping them for that.
An interface preview is here. I bet CodeJock and BCG will soon get these new beta interface components in their products.
We are getting closer of ATI's new lineup of video cards - rumors here, here and here [theinquirer.net]. nVidia has the lead since about two months with 7800GTX, however ATI's new cards are designed from scratch, being completely new generation ones (with SM 3.0, HDR, H.264 decoding and so on). I'm pretty sure about upgrading my PC now !
I'm in charge of maintaining a localization-aware version of the product we're working at. So besides taking care all the strings are in resources and all the controls load their text from them (this in VB only), I find it pretty hard and cumbersome to get each new version of the product translated (a translated version is a set of resource DLLs, one for each application).
Rather quick-and-dirty (not so quick actually) improvements would be to parse the resource files, build a dictionary and have a tool to automatically re-build them from the dictionary (so basically take the english version - these are the resources used in the EXEs and in the development, duplicate them and change the messages with the dictionary), also it could report un-translated strings. Still I would have to check the dialogs and slightly re-arrange the controls to fit the new text ( problem also reported here - didn't solve it until now).
The new Firefox is very nice - features tab drag'n'drop and vastly improves speed when using back / forward (Opera had this caching for ages though).

ACM

Tomorrow there is another phase of the ACM contest, so we'll know the teams that will go to the South-Eastern regional. My team is together with Adrian Drumea (a good old friend of mine) and Bogdan Prisacari.