Tuesday 29 August 2006

Balchik rules, Albena sucks!

I have just returned from a holiday in Balchik, Bulgaria, and this is my view on it.


You might have seen a commercial or heard a friend that Albena and Balchik are a great place to visit and spend your holidays. Even if they are separated by only 10 km the difference between them is the difference between heaven and hell.

Albena is the standard seaside commercial resort, with wide beaches occupied by a string of expensive hotels, with jerks attempting to speak to you in your native language while trying to sell you junk at high prices, a place invaded by tourists and with poor service at any shop, as they are owned by companies and operated by hired help. The useful things you can buy at Albena are of very little variety, meaning that almost every shop has everything you can buy, all drinks are either Pepsi or Coca Cola, etc. Albena is a franchise, and besides the natural reserve (which is a nice forest patch) and the Tracian treasure (that I didn't really go visit), there is nothing nice there.

Balchik, on the other hand, is a small piece of paradise. It is actualy a town, a rather old one, with small houses (and villas) sprinkled onto an almost abrupt seawall. The beach is very small and private, while the shops in the area are operated by their owners, which are usually very nice people. The prices are almost half of anything you meet in Albena and the tourist numbers are small during the week and medium during the weekend. Another good thing about Balchik being a town is that you have both seaside hotels, small villas, large villas, apartments for rent or purchase, high profile restaurants, small cozy restaurants, cheap supermarkets, etc. So you have everything you need. The view is spectacular, with a tasteful combination of mountain and sea.

In conclusion, I highly recommend Balchik as a holiday destination or (as I fantasised during my stay there) a remote place where you can buy a house or apartment and write in the quiet atmosphere of the small town.



Now, for the detailed impressions from Balchik


Leaving Bucharest


Both me and my wife wanted a nice holiday where we get to experiment as much as possible, so we decided against an "all inclusive" package. So we arranged with people from Balchik to house us, while we took transportation separately. Searching on the web, we stumbled upon Balchik Holidays, a site owned by a young nice couple, Val and Marta, operating a small local tourism company with very decent prices. As you will see later on, they treated us fairly and nice and we recommend them if you need to make similar arrangements. We decided on Corali as a transportation company. Our opinion of them is poor to very poor. They are plagued by lack of proper organisation, delays in transport and drivers that don't know the cities they pass through. I will give them the benefit of the doubt, though. Maybe there are situations when they perform well, but this was not one of them. Unfortunately, I can't really imagine a Romanian company that would do a lot better, so don't expect too much from the trip to and from Balchik by bus. It could be a good idea to look for a company that goes to Albena, then get a 4 leva bus to Balchik.

The bus left Bucharest at 8:30 and, enough said, arrived in Balchik at 18:00. The bus started from somewhere in Transilvania, though, so there are people who spent a lot more in the bus than we did. Immediately it became apparent that the well organised passanger list contained 51 names. The bus itself had 50 seats. That meant that one lady got her money back and spent the entire road on a small chair with no back placed amidst the rows of seats. I also don't know who makes these buses. While they look nice and are air conditioned, I couldn't fit my legs properly the entire trip. Even if I am a rather tall guy, the length of the femur bone shouldn't be much bigger than the one of a smaller guy, the lucky guy the buses are designed on. I think the highest age at which I would have been comfortable in those seats would have been 14 years old.

Ok, enough with the seats. The bus starts from Bucharest, goes to Constanta, leaves the country through Vama Veche, then proceeds to Balchik. The highway to the sea is not yet finished, so there were delays there, then the customs, which must be "greased" to let us through. The customs officers reached a so high level of confort that they took money while we all looked through the windows of the bus. We could have had cameras or something, but they didn't care.

Once we reached Balchik we were deposited in a parking lot placed in front of the road towards the Botanical Garden. If I am to continue my religious analogies of heaven and hell, that spot is purgatory. It is the most 'Albenised' place in Balchik. You have restaurants that boast their menus along with greetings in Romanian and waiters that try (annoyingly, I might add) to speak Romanian or whatever your native language happends to be. The prices there are medium to high, the service depends on the place.
For example I was terribly disapointed by the service at Taraleza, a small restaurant that was praised in a Romanian TV news story. The only Romanian they knew was in the greetings outside, the prices were high, the crab rolls they gave us make my wife sick, the tripe soup they gave us had very little tripe in it and (what bugs me most) I asked them for garlic and they brought me a small cup of a clear liquid. They refused to bring me sour cream, they said the soup had enough (as they would know). I poured the entire cup in the soup, only to find it a moment later uneatable. The 'garlic' sauce was garlic in vinegar.
The Sea Horse, the restaurant right in fron of the parking lot, had the same tripe soup (even the amount and shape of the tripe bits were uncannily similar), but they brought dried red pepper bits and a sauce that contained yoghurt, as well as garlic and , of course, vinegar. That was more acceptable and I could even feel the garlic inside.
As a paranthesis, Tihia Kat, or at least this is how I remember the name, a serbian grill restaurant on the seaside, have a garlic sauce made from sour cream and very little garlic.
But back to the parking lot, except for their monetary exchange, you shouldn't really use anything there. Besides, when you will leave Balchik you will have extra levas (the Leva is the Bulgarian money) and you will have to wait for the bus (which will be late) so you will be forced to sit somewhere.

Balchik


When the bus entered the town, we got scared. There were communist style blocks of flats, really ugly ones, and dirty garbage filled road sides. But that's just on the outskirts. As you will see, Balchik is actually made of two distinct parts: the side near the sea, which is the old part of the city, with houses and queen Maria's summer residence, and the expansion zone, where you will have blocks of flats, schools, a large super market, etc.
Our two rooms apartment was 500 m from the beach, as advertised. What was left unsaid is that the road is a continous hill at maybe a 30 degrees slope. That resulted in muscular pain for the first two days, but we quickly got used to it. What was unexpected was that the pain felt in the lower part of the leg, which is actually very little exercised. And I should know, I ride my bicycle to work.
This side of the city is a combination of modern construction techniques and old stone roads and walls. If you are a computer programmer and you build maps for 3D games, like shooters or, better yet, quests or MMORPGS, then you should definitely go to Balchik and your software company should pay for it. There is something to be said about stone stairs that are hidden from view by the fact the walls are made from the same exact material. If you stay more than a day or two, you will come to know not only the streets, but also these hidden stairs that you can find all over the place.
We also had TV cable in our rented apartment. Something was wrong with it, though, as only a few channels were clearly visible. And, even if I did want to relearn Bulgarian, I couldn't watch anything but National Geographic, Zone Reality and Viasat History. I even stumbled upon a show about a bus going down hill without breaks, entering the water, skidding 80 meters, then drowning most of the people in it. Nice show, huh?
Val and Marta were very nice, they took us for a dinner and they explained the main things we needed to know about the town, then they gave us the house keys and left us be. They weren't a bother in any way and hopefully, neither were we to them.

Holiday


There was sun there. And lots of it. If it weren't for my wife, I would have cowered in fear in the room, trying to fix the cable. Luckily, she rules my life, so I went down to the beach every morning, then we ate in a restaurant, then we had long walks through the city. If you are like me, you should not disconsider the power of the sun lotion. They seem to have different strenghts marked by weird numbers. Just take the highest strength you can find and put it all over you. Else you get your skin burnt. And, if you are like me, you hate having oily things on you that smell like flowers and squeezed animals. Get over it. Not being able to touch anything or having any type of water except very cold one seem hot is not cool. (Pun not intended)
Balchik is truly beautiful. Formerly part of Romanian teritory, it was chosen by queen Maria for her summer residence. That means a huge domain was filled with beautiful gardens and a few nice mansions were built. The buildings themselves are not interesting, the small trinkets that are linked to the queen or to her house are nothing more than money wasters, but now the domain was turned into a Botanical Garden. Even if less organised than the one in Bucharest, it is a lot more interesting. It combines slopes, plants of all kinds (including cactae), water falls, a high view of the open sea and the all present stone stairs and hidden passage ways.
The town itself looks a lot like a more crowded version of Maria's residence, with fisherman style houses sprouting amongst the stone roads and plants. This is something that the Romanian seaside lacks: plants. Even Albena had beautiful trees and forest patches near the sea. Romanians destroyed everything that wasn't cheap commercialism.
The prices were all in leva, which was more or less half a euro, and stotinky, hundredths of a leva. Energizer drink: 1 leva. Average restaurant meal: 7 leva per person. Taxi ride: 1-5 leva (for the same distance). Beach umbrella: 3 leva. Beach chaiselong: 3 leva. (as opposed to Albena where a chaise was 5 leva, a pillow was 3 leva, an umbrella 7 leva, etc.) Evening meal from the supermarket: 5 leva for two people. Restaurant bread slice: 20 stotinky.
I have no idea why every Balchik restaurant asked us for the exact number of bread slices we wanted. I asked smilingly for one bread and they brought me a slice. When I asked for ten slices all the waiters turned towards me like they have seen the devil. "Are you sure?".
The sand on the beach was very fine, as well as the sand beneath the water. There were two days after what we gathered was a storm in the open sea, when the shallow water was filled with algae fragments, but it wasn't terribly annoying. The entire Golden Sands-Albena-Balchik beach is in a golf, so there are no big waves and the beach is somewhat protected. The water was warm and pleasant.
People on the beach ranged from very fat people coming in families to skinny young girls. Not many girls, though. The ones that were acceptably attractive were more slim than sexy. There is no distinctive Bulgarian genome. People can look like Turks, Russians, Romanians or anywhere in between. Balchik has amazingly few gipsies.
Language: all Bulgarians know Bulgarian. Some of them understand English, some of them understand Romanian. I guess that some of them understand German, since all the menus were in Bulgarians, English and German, but I didn't try it out.
Music. I have been informed that a few months ago there was a rock festival in Balchik, White Snake and The Scorpions sang there. But I found that this was not a good enough explanation for the fact that almost every song in the town was an American 60-70's song. It wasn't annoying, but it was uncanny. I've even imagined Teal'c observing that the music technology of the planet seemed to be 30-40 years behind our own.

The Dark Side


Search for the supermarket Akvilon, on Hristo Botev street. It marks the start of the dark side of Balchik, the place of ugly grey blocks of flats. They do have regular cable and internet, though. Akvilon does provide for anything you need, as it is similar to Billa or MegaImage shops. The prices are lower than anything you get in the old part of the city, but not by much.

The End


We left on monday, the bus was supposed to pick us up at 18:30 from the parking lot, they were there, but only arrived in Balchik. We had to wait until 20:00 for them to go to the Golden Sands and Albena, leave their passengers, then return. We arrived in Bucharest at 2:00 in the morning.
What else can I say except thank you for sticking to the very boring end of my notes on Balchik. Maybe I will add more as I remember.

Special Notes



  • Cats - Balchik is a town of cats. Everywhere you go you meet a cat of any conceivable color except green. Most are accustomed to humans and grateful for any petting, playing or, of course, food

  • Bread - restaurants give you bread in slices. They ask for the exact number of slices. One bread means one slice.

  • Ayran - in Romania, ayran is a liquid yoghurt drink with salt. In Bulgarian, airan means yoghurt. So you will be able to see Danone Airan. They do have a sortiment of liquid salty yoghurt that is very tasty in rather unpleasant plastic 500ml or 250ml bottles. Ask for airan at Morsko Oko. They used this variety. Then you can buy it at a supermarket

  • Boza - there is a drink made (I guess) from sweetened wheat called Boza. I can't imagine any person except an insane child that could drink boza and like it.

  • Music - most places were tuned to Radio Edno (radio 1) and they played mostly songs from the 60's-70's.

  • Garlic - beware the garlic sauces. They are likely to contain less garlic and a lot of vinegar

  • Romanian speaking waiters - beware! Even if there are some exceptions, Bulgarians trying to communicate in Romanian usually want to sell you overpriced or underquality stuff

  • Taxi drivers - good luck trying to convince them to start their meters. Try not to give them 5 leva for a trip.

  • Botanical Garden/Maria's Castle - you may be intrigued by the ticketing system there. You need to buy a ticket of 10 leva to see a small garden, then advance to a ticketing booth to get another 10 leva ticket for the castle and the actual botanical garden. At the entrance to the castle you will be asked for both tickets. You can't buy them there, you need to go back 10 meters to the above mentioned ticketing booth

  • Muscular pain from climbing up and down Balchik streets - a massage helps, try pressing more on the painful parts. It doesn't help too much though. Walking another day is useful, also.

  • Bus rides - if you are taller than 1.80m, ask for special seating for your legs.

  • Car rides - the Balchik streets are at 30 or more degrees slope. Drive carefully.

  • Toilets - most of the bars and restaurants in the town have the annoying habit of charging for the use of their toilets

  • Albena - it sucks. If you want to go there, there are regular minibuses to Albena, Golden Sands or Varna

  • Recomended restaurants: The Blue Lion , Morsko Oko

  • To avoid: Taraleza, the Irish Rover, the cafeteria in front of the Irish Rover, the bar in Queen Maria's residence.

  • You might notice in Balchik a lot of printed A4 posters glued upon light poles, gates, bulletin boards, etc, representing dead people and when they died. It seems to be a local habit of commemorating the deceased.

Friday 18 August 2006

Control must be placed inside a form tag with runat=server in NET 2.0

GridView Export to Excel Problems

This guy researched why simple methods like export datagrid to Excel don't work with GridViews or other controls. I have also stumbled on this stupid error when trying to use RenderControl to get the output of a UserControl.

Apparently, the entire problem lies with the
Page.VerifyRenderingInServerForm Method
which throws an exception if the page is not currently in the render phase of page processing, and inside the <form runat=server> tags.

Luckily it can be overridden. Here is the bug posting at Microsoft and their suggested solutions. Microsoft removed the page, so I can't show it to you.

This is the actual code for the method in the Page control in NET 2.0. Just override the hell out of it.
public virtual void VerifyRenderingInServerForm(Control control)
{
if (this.Context == null || base.DesignMode) return;

if (control == null)
{
throw new ArgumentNullException("control");
}
if (!this._inOnFormRender && !this.IsCallback)
{
throw new HttpException(System.Web.SR.GetString("ControlRenderedOutsideServerForm", new object[] {
control.ClientID,
control.GetType().Name
}));
}
}

Representational State Transfer or REST. Is it the new software paradigm or just a big SOA blowout?

Business - Redefining How Software Works

REST (Representational state transfer)

Representational State Transfer

Probably what I am saying here is naive, as I hate XML and don't quite understand the full scope of things like REST, but from what I managed to gather, this system has a few possible advantages: good caching, good division of resources (both computational and data) which should allow for better user in multitask/multiprocessor systems, true native use of XML (or any other format :D), therefore saving a lot of time from serializing, instantiating, deserializing, etc.

If what the first article says is correct, this would prove to be a system both adaptable and scalable, something that programmers seek all the time. It can be spread out on more computers on a net or used on the same computer, with more efficiency and easy of programming than the dreaded web services or SOA.

Personally, I think I wouldn't particularly like programming in a REST way, but one never knows.

Wednesday 16 August 2006

WinDirStat - Windows Directory Statistics

WinDirStat - Windows Directory Statistics

WinDirStat is a little useful program that creates a graphical representation of one's harddrive. It uses colored rectangles to represent directory structure, file size and file type. You can click on the rectangles and see what the file is, zoom in and out, etc. What's mostly useful for is seeing the big space wasters as large rectangles and being able to identify them. I am still not sure what Unknown space is, but I have 6.5Gb of it.

Tuesday 15 August 2006

In love with oneself

A good friend of mine was telling me when we were in highschool that people are made out of different personalities, each alive and fighting for control. He called them rather pompously infrapersonalities. They all define you in some way or another and the "you" is not a simple sum, but a warped weighted average.

Taking the reasoning further, I reached the conclusion that the way we perceive other people is also encapsulated in a hostage personality that describes that person. We don't relate to the actual people, but with our projection of them. Of course, that applies to everything, not just people, but it's besides the point I am trying to make.

What if you spend a lot of time defining such a person? Doesn't it mean the associated infrapersonality "gains weight"? It becomes more alive inside you. There is even a disorder when people switch from one dominant personality to another.

But what if you had feelings for that person? Could its infrapersonality remain alive, evolving separately inside you? Of course it could. And then, why can't you retain the feelings you had for that person if it is alive and so close to you?

I end my reasoning here. I completely pass the (important) point that even if you do love a living and existing person it is still a feeling related to an internal representation of that person. At least it gets updated. Can one projection of another person make you continue to be in love with it, in the absence of that person? I think it can. Worse, I think it is happening to me, and that makes me (even more than you possibly thought) in love with myself. Bummer, huh?

End to all stupid wars?

It just occurred to me that the biggest problem on Earth is not war, but the unending talks that come afterwards. Therefore, I propose a UN resolution that bans war. If any country starts a war without being sanctioned by the UN, it is to pay. And pay a lot. No, the answer is not military retaliation or anything, but money. Each unsanctioned war day is to cost between 10 and 100 million EUROs.

The solution is both simple and elegant. If you need to start a blitzkrieg, do it, just make sure to pay afterwards. You want to go to a country, bomb its infrastructure, steal its oil? No problem, just make sure you win more than you pay to the UN. You want to stall the peace talks? Ok, but do it on your own money. You don't agree to pay? Just forget about exporting or importing anything.

Of course, there is a catch. Lately, no conflict was called a war. Therefore a clear definition of it is also required. That would help mentally challenged leaders to use the right words, too. What's my definition of war? Any conflict outside your borders perpetrated by the national armed force.

What about Hezbollah? you will ask. They attack outside the Lebanon borders and are not the official national armed force. They should be off the hook. Yes, you heard me right. Israel wants retaliation, do it with a private force of people payed or otherwise motivated to do so. In other words: pay for it!

And if you don't want to pay, ask the UN, NATO, or any other legitimate international force to sanction your need for blood or solve your problems or whatever. We can't wait for politicians to solve a problem WHILE the problem exists. They move slow, they have no foresight and their hindsight is limited to what helps them look good. Use preemptive measures: any war costs. Don't forget that the military and the politicians are ruled by the same type of people that rules everybody today: suits! The modern name for aristocracy. And they only care about one thing: money!

Monday 14 August 2006

Accessing Row based data in an efficient and maintainable manner

Accessing Row based data in an efficient and maintainable manner - The Code Project - C# Database

This is a nice and simple article about accessing data from a lot of datarows. While using the string index will make the code more readable, using the integer index will make the code faster. The solution? Get the numeric indexes at the beginning of the loop, based on string indexes. Assert the indexes exist for better debugging. Very elegant. Also, check out the user comments, which are pretty good and to the point.

Code example:

int customerIDIndex = table.Columns.IndexOf("customerID");
int customerFirstNameIndex = table.Columns.IndexOf("firstName");
int customerLastNameIndex = table.Columns.IndexOf("lastName");

System.Diagnostics.Debug.Assert(customerIDIndex > -1,
"Database out of sync");
System.Diagnostics.Debug.Assert(customerFirstNameIndex > -1,
"Database out of sync");
System.Diagnostics.Debug.Assert(customerLastNameIndex > -1,
"Database out of sync");

foreach(DataRow row in table.Rows){
customer = new Customer();
customer.ID = (Int32)row[customerIDIndex];
customer.FirstName = row[customerFirstNameIndex].ToString();
customer.LastName = row[customerLastNameIndex].ToString();
}//end foreach

Add table header on each printed page

How to include a header on each page when printing a DataGrid - The Code Project - .NET

There is a simple solution for printing tables with repeating headers on each printed page. It involves CSS styling of the THEAD section of a table. Unfortunately, neither DataGrids nor GridViews render the THEAD tag. Somehow, Microsoft seems hellbent against it. So either create a control that renders THEAD, then add "display:table-header-group;" to the THEAD style, or use this Javascript function:



function AddTHEAD(tableName)
{
var table = document.getElementById(tableName);
if(table != null)
{
var head = document.createElement("THEAD");
head.style.display = "table-header-group";
head.appendChild(table.rows[0]);
table.insertBefore(head, table.childNodes[0]);
}
}
Update:
Building a GridView, DataGrid or Table with THEAD, TBODY or TFOOT sections in NET 2.0

Monday 7 August 2006

ASP.NET 2.0 Authentication and new controls

Using SQL Server instead of Access files:
1. Run aspnet_regsql.exe (from the NET Framework 2.0 folder)
2. Add to web.config (inside the configuration tag):
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
(that's because LocalSqlServer is already defined by default. Really dumb)
3. Go to the Website menu in Visual Studio -> ASP.NET Configuration and create users, roles and access rules.

Logging out programatically:
FormsAuthentication.SignOut();

Changing settings for the membership (in system.web section):
<membership defaultProvider="CustomizedProvider">
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/"
requiresUniqueEmail="false"
minRequiredPasswordLength="1"
minRequiredNonalphanumericCharacters="0"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
commentTimeout=""/>
</providers>
</membership>

Wednesday 2 August 2006

On antisemitism, again

Gibson arrest 'handled correctly'

This is a rant marginally related to the Holocaust sucks post. Let me first say that I am NOT against the jewish people, even if I strongly think the Israeli external policy is a dark shameful spot on the face of humanity in general.

There are some words or attitudes that are socially not cool, politically incorrect, or whatever you want to call them. For example talking about fascists or terrorists as bad people is good. Talking about Jews as bad people is not good. Using 'nigger' when you're white is not good, but as a black man it's completely ok. I wonder if it's ok to say it if you're Asian. Of course, this is all bullcrap. People have the right to say what they think and not be persecuted by it. Eventually, if a behaviour is determined by society to be wrong, then it should be punished or looked down upon in ALL its manifestations.
My main focus today will be antisemitism. First of all, the very word annoys the hell out of me, Semites are Jews as well as Arabs and some other nationalities. To hijack the term to mean almost exclusively racism against Jews is discriminating in itself. Second of all, there is no need for a special word that describes racism against a single race or group of races. We've determined that racism is bad and that antisemitism is racism, so why use two words? Is it because, somehow, idiots think hating Jews is worst than hating Romanians, for example? And third of all, have you noticed that the most "opressed" of nationalities usually have a strong xenophobic culture, almost always having a special word for people that are not like them? The Jews have Goim, which means People and also Body. They very rarely use it in relationship with jewish people and most of the time only to refer to non-Jews. They also have specific other words that mean non-Jewish. They don't use kind words about Goim either. But I guess that's not racism, because they actually look down upon all races equally, except their own. In a way, they discriminate themselves, right?
So my solution is this: let us consider any racist remark a bad thing, while in the same time consider idiotic and not worth any attention any phrase or argument that contains "antisemitic". That would solve it, right?

Tuesday 1 August 2006

WMI and Scripting Center

Scripting Center
Download details: Scriptomatic 2.0

WMI or Windows Management Instrumentation is Windows service who's basic function if to get information from a computer (even remote ones), but that has been upgraded to be able to also put information or run stuff. Weird little things like the manufacturer of the sound card or information about installed and running programs can be extracted with WMI, but also reading from a database or automate Sysadmin tasks for all the computers in the network, etc.

Well, this blog entry is not supposed to explain what WMI is, but to introduce the Microsoft Scripting Center. The link is above, it shows you how you can access and display/modify, etc information with WMI using scripts. The tool Scriptomatic 2.0 (download link above) automatically creates scripts in vbs, js, python and perl to list information in any of the WMI classes. The Scripting Center has a lot of scripts, categorised, so that you can download them and use them directly or with little modification, also tutorials and other useful links. Check it out!

WindowsFormsParkingWindow a.k.a The devil (reprint)

I had problems with WindowsFormsParkingWindow and a lot of the references on the web pointed to this blog article. Unfortunately, the page was not available when I started searching for it. The only place I could find it was google cache, god bless their big googly hearts :) Therefore I am reprinting the content here, maybe it helps people:

=== WindowsFormsParkingWindow a.k.a The devil ===

I have been working on an application for a few weeks and suddenly it started freezing up for no reason. After copious amounts of swearing and breaking keyboards I found a hidden window in the windows task list. It was called - WindowsFormsParkingWindow. My new worst nightmare.

Nothing seemed to stop this issue from killing my program. After more swearing and cursing I found that this error happened after ALT-Tabbing away from my app and back into it. The parking window would appear and my app would die. I ran WinSpy++ and made the hidden window visible. Behold the glory of the following...

The hidden window contained a user control that I had previously removed off the form. This might not make sense to you now but let me explain the significance. When you remove a control from a form/panel, it gets put onto a WindowsFormsParkingWindow until you put it back onto the panel/form. So the WindowsFormsParkingWindow is kind of like an intermediate place windows keeps user controls before they are put into containers.

You might ask now - "What has that got to do with my app freezing?" Well, I'll tell you exactly why... Because when you remove a control from a panel/form and it has focus, the focus stays on the control (which is now on an invisible form). That's why events fail to fire and the app becomes unresponsive.

The solution? Easy...

Instead of using pnlParent.Clear() or just removing the control you need to do the following:

1. Remove the focus from the current user control by setting it to the parent form.
2. Remove the desired user control by using the ParentControl.RemoveAt( indexOfUsercontrol )

This should clear up the issue.

Observe: I am saying nothing

Just now I watched a little youtube.com video that explained the two slit experiment. Basically, what happends is that a pattern emerges if you use waves and another when you use particles. Then you fire electrons in the thing, and wave patterns emerge, even if you fire one electron at a time, therefore the single electron is interfering with itself! But even stranger, when you put an observer to see what slit the electron goes through, the pattern changes into a particle pattern. This proves that observation changes what we observe.

Wait a minute! But isn't science supposed to be based on observation? This very experiment has been observed, for crying out loud. So what does it mean? If you demonstrate something by scientific experimentation, therefore using observation, doesn't that mean you only demonstrate what happends when you look at something, rather than what that something is? Since the same experiment has been observed using eyes and it behaved differently when they use a finer tool, then it means the type of observer alters the result. Would things start behaving differently if an alien was to come on Earth? This is mind boggling.

Links:
YouTube video -< it was removed from YouTube
Another YouTube video
Wikipedia on the double slit experiment
Cool java applet on wave interference