>One year – and a contest

>As some of you might know I’m one of the admins over at QtCentre.org. The site has being going for a year now and I must say that I’m thrilled by the outcome. The major point for starting the site was to provide the community with a free forum – but we also have a nice wiki and a FAQ.

As we enjoy Qt programming and want you to try your Qt 4 skills we have decided to start the first QtCentre Programming Contest. With great support from the Qt companies out there – Trolltech, basysKom, froglogic, Integrated Computer Solutions and Klarälvdalens Datakonsult – we can offer prizes such as Greenphones, a MacBook and an iPod. The competition entries must enter in one of the following categories: custom widget, development tool, helper library, mobile application and desktop application. The categories have been picked so that pretty much any piece of Qt software can join so register your project today and start coding!

>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 :-)