>The Efficient Month Starts Now

>Now Christmas is over and it is time to get seriously efficient. Right now I’ve got 30 days, seven chapters and three articles to write before I get back to writing in my spare time. Before my head falls of from all this writing (I have prepared 9 examples and written down all the notes for a chapter of multi-threading today) I just wanted to show a small update to my Acer fix software.

I found a gap in the calendar last week and added a small loop that looks for the window every five seconds. This means that it works regardless of the starting order of the applications. The new source looks like this.


#include <windows.h>

int APIENTRY WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, int nCmdShow)
{
HWND acerWin = NULL;

while( (acerWin=FindWindow( NULL, "ACER_GraviSense" )) == NULL )
Sleep( 5000 );

if( !acerWin )
return -1;

SetWindowLong( acerWin, GWL_EXSTYLE, GetWindowLong( acerWin, GWL_EXSTYLE ) | WS_EX_TOOLWINDOW );

return 0;
}

Using this you can alt-tab freely without having to run into an invisible window now and then. I wonder if it would be fun calling their help-desk and trying to give it to them as a contribution. :-)

Another note is that my employer, Bitsim, has announced Badger. This is a platform that I’m really looking forward to playing with. So if you’re ever in need of an Arm system capable of hardware accelerated graphics you know where to look :-)

>Holiday Spirits

>Lots of preparations as the holidays are getting closing – quickly. Right now I’ve prepared 1.6kg Swedish meat balls (this is about a third, just before frying them).


The next stage was the Christmas tree. A nice Swedish spruce (gran) with decorations, next to my favourite working arm chair. The pillow is made from the original clothing.


And what is this?


It is the top of the decoration that we use to cover the hole over the stairs since the upper floor is far from done. The other side looks more appealing. Thanks to Illum, Copenhagen for the idea. My wife noticed the style there. Using the right thread and amount of balls – we use 27 – a “cloud” of balls is created.

>Acer Annoyance Fix

>One of the things that have annoyed me since I started working with an Acer laptop was that when working in Windows the GraviSense application appeared in the Alt-Tab list even if it had no window to show. To save that extra Tab key press I asked Raymond Chen for a tip on how to make it go away. The solution was to set the WS_EX_TOOLWINDOW extended style bit. Taking this and the good old LCC-Win32 compiler I put together the following little snippet and the window disappears from the Alt-Tab list but stays alert (I shook the laptop gentry to trigger it).

#include <windows.h>

int APIENTRY WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, int nCmdShow)
{
HWND acerWin = FindWindow( NULL, “ACER_GraviSense” );

if( !acerWin )
return -1;

SetWindowLong( acerWin, GWL_EXSTYLE, GetWindowLong( acerWin, GWL_EXSTYLE ) | WS_EX_TOOLWINDOW );

return 0;
}

And they say that Linux is for those who wants to hack the system… :-)

>No mode dead-lines

>Finally I have no more dead-lines this year. This does not mean that I can relax for the next couple of weeks but it means that I’m no longer working with a knife to my throat. Next month will be interesting… I’m planning to write seven chapters for my book, around 170 pages. I also plan to write two articles for Datormagazin (some 10 pages with a small font – almost 20 A4 pages when using Word with its default font). I guess 200 pages per month (10 pages per work day, 1.25 pages per hour, including research) is what it takes for a technical writer and that is one of my professional options that I’m looking into for the moment.

Anybody out there needing help with white papers, articles, documentation or any other text in February – feel free to contact me. I would prefer to work close to Qt technologies, but I’m open for other suggestions too.

>Quick Question

>Right now I’m building a dll file on Windows using the following make file:

all: sum.dll

sum.o: sum.c
gcc -c sum.c

sum.dll: sum.o
gcc -shared -o sum.dll sum.o

To build a so file on Unix I have to change the first and last lines to read sum.so instead of sum.dll. The same thing applies on OS X, but there I want to build sum.dylib. Does anyone know if there is a little flag or such that I can use to let GCC add the right file extension to the resulting file without having to play around with environment variables and such?

>Time for Qt-ness

>As of today I will spend all my working time on my book on Qt and other Qt projects until February. Hopefully this will mean a boost in productivity – I just want to avoid working myself to death :-)

>Two Weeks to Christmas

>Now it is just two weeks left until Christmas. Three weeks until the new year. The current state is that I have bought one Christmas gift – lots to go – and that my wife’s birthday is on the last day of the year. This means getting at least one more gift.

I also have to complete two more chapters for my book project – and complete my current customer project. I’m helping an automotive company some 70 kilometres from Gothenburg with their test management system.

Now, I’m not the one in the biggest rush – not by far. King Bore has not even got started. It is still between five and ten centigrades above freezing and no snow in sight.

I’m dreaming of a white Christmas…