This blog has moved. Please update your bookmarks.

Merry Christmas!

Christmas Lights? Sure

People sometimes make fun of me (in a kind-hearted way, naturally) for being so Americanized. I don't exactly know how it happened; all I know is that I stood in the middle of a huge field in Montana and called out "I am an American!" and from that point on, it was all set in stone. :)

It always pops up around Christmas-time. To me, it's entirely natural to play Bing Crosby and decorate everything in millions of Christmas lights. Although I haven't quite had the urge to decorate my surroundings in lights this year, my Christmas tree at home looks more and more like a Disney Tree for every year that goes by. I've even committed the cardinal sin of adding lights that flash in many different colors to it.

Sweden is cozy at this time of year. With the sun setting early in the afternoon - sometimes around 3pm already - it is easy to appreciate all the little lights everywhere. Swedes like to put up little stars and candlelights in the windows, which means every window is decorated with lights. It makes the darkness a little brighter.

While they're not going totally overboard like Americans do, the trend of decorating with lights is catching on. Little pine trees in the front yard get decorated, and sometimes even entire houses. Some people probably think it's eroding our traditional Swedish customs.

But when I took the train this morning, and rolled down towards Gothenburg in complete darkness, every once in a while I came upon a little lone pine tree out in the dark night, decorated with hundreds of tiny little lights, and it made everything look so much nicer.

Sweden, being naturally more mellow than the United States, will probably never catch on to such extremes as America does. But every little bit counts. Here is one foreign influence worth keeping.

Sky Belt: Buckled Up For The Holidays

Recently I've started reading a blog called Yu Hu Stewardess, a funny and sometimes very opinionated flight attendant working for an [unnamed] airline in the U.S.

Having two friends who worked in the airline industry themselves - as, precisely, flight attendants - makes the reading much more interesting.

Her fashion tip of the day is the Sky Belt. It's a belt made out of colored webbing, with the belt buckle made out of recycled airplane seat belt buckles. My friend Bob loves belts. I wonder what he would think of this one. :)

Nordic Light - Drawing Defensive Lines

(September 11, 1992) The Russian advance continues. Kuusamo has fallen, Mikkeli has been overrun and Kotka is occupied. Airborne enemy forces keep appearing, encircling Hanko and threatening Helsinki.

In Sweden, forces desperately defend Nynäshamn and Muskö while evacuating remaining forces. Eskilstuna and Oxelösund have fallen, and further seaborne invasions have taken place at Västervik, Oskarshamn and Trelleborg.

Forces are still scrambling for supplies, but initial counterattacks have gone well: An entire Russian marine brigade in Trelleborg was annihilated; counterattacks all over Finland have also gone reasonably well considering the circumstances. The strategy is now turning to harassment; with activities deep behind enemy lines, special units are now blowing bridges, destroying railroad and carrying out attacks against Russian infrastructure to delay the advance as much as possible.

Meanwhile, advance elements of the II U.S. Marine Expeditionary Force have arrived in Norway and are carrying out the initial work of strategically redeploying the force to meet the invasion of Scandinavia.

It is now a matter of how much the Russian advance can be delayed before the mobilization gains strength and NATO elements arrive in force.

Threads are HARD

I'm up in Northern Sweden right now at a customer site and debugging our application.

When we released the 2.0 version, some thought that the program was much slower than before. The main reason as to why is that the program was previously split apart into two programs, communicating through Windows messages. Now they're all integrated into one application, which means there's only one thread that does everything. So nothing happens in parallell anymore, and this means that people have to wait for operations to finish before continuing.

Enter threads.

The main problem with threads is that the execution takes places in parallell, but within a fundamentally single-threaded framework (VCL). So worker threads are created, but need to synchronize with the main application when they're done. Furthermore, some requests must wait for the worker threads to complete before they can continue.

And most importantly: any reference - any single one - to a VCL object in a thread can cause the application to throw an exception. Or crash wildly.

Culprits so far: Forgetting to embed everything in try/except blocks in TThread's; using Create( Self ) on objects which run in multiple threads (must use nil instead of Self) and spurious Application.ProcessMessages that cause threads to interject update calls in potentially sensitive areas of code in the main thread.

All this makes me wonder how stable things are going to be when we eventually end up with four or eight processors in workstations. Servers are easier because they typically don't require access to screen elements and message loops. But end-user UI programs... that's hard.

Nordic Light - Invasion!

This is a war diary written about the Operation Nordic Light scenario.
(September 8, 1992) The massive buildup of Russian forces meant only one thing: A full-scale invasion of Finnish and Swedish territory. But the force and aggression was beyond what the national Government counted with.

This has happened: Top national government officials has been assassinated. Spetznaz sabotage against crucial military installations were quickly followed up by massive airstrikes. Finland was presented with an offer of conditional surrender, which was quickly rejected; and immediately thereafter, Soviet mechanized divisions crossed the border, quickly subdued the defenders and approached Kotka and Lappeenranta. The guard force at Imatra is in incoherence and cut off from the rest of the forces. Airborne brigades have parachuted in behind the lines, with one regiment between Lahti and Kotka.

In the north, Soviet divisions are approaching - relatively undefended - Suomussalmi, Kuusamo and Kemijärvi, while the defense is scrambling to gather and coordinate available forces.

Sweden took the main brunt of the force in Norrtälje and Oxelösund, where Soviet forces quickly moved in on Stockholm, and attacked and occupied the central district with relative ease. Nyköping, Uppsala and Strängnäs is also occupied, with front elements moving in on Norrköping.

The Swedish defense is still very uncoordinated and unprepared. The few forces available have been quickly swept away, while further brigades are mobilizing in the west and scrambling for whatever supplies are available. Much of the air force is reorganizing due to heavy air attacks.

NATO has reassured Sweden and Finland that the air force will be sufficiently strengthened by NATO intervention, but the tactical deployment of the NATO air forces will take a few days to accomplish.

Meanwhile, the Soviet war machine rolls on...


Blog contents copyright © 2005 Mats Gefvert. All rights reserved.