It is weird that this doesn't happen with all types of Visual Studio projects, but only with Web apps. You have all those annoying .MySCMServerInfo files that pop-up in your check-in window and then cause errors because SCM knows they should not be checked in.

Enter StackOverflow with a really good solution: Hidding source control files within Visual Studio’s solution tree. No need for me to copy paste, just remember you need to restart Visual Studio for this to work.

and has 0 comments

I didn't know about this, however, through a weird series of events, I have read about this in a book, then heard about it from a friend, then wiki'ed it and got really disgusted, then found it in the news, as the UK government finally issued an apology to one of the great men of computing.

Here is the government apology link and (apparently, the apology was too much for the Brits to leave on their web site for too long. Instead, you have to read the text from the historical archives of the government site hereanother link from a blog I am reading which says just about what I was going to say.

I have to say that governments scare the shit out of me. The things they can do are so horrendous that most people refuse to think about it. And as the sleep of reason produces monsters, they usually become monstrous. After all, what are they than a big clump of responsability that every citizen sheds in order to feel good about doing nothing?

So, sorry, Alan Turing, for being part of the species that did this to you! I truly feel ashamed.

Update 24 December 2013: The UK government issued a pardon for Alan Turing. Posthumous, a gesture that would be rather pointless if it weren't for the chronic inability of authority to admit to their mistakes (not to mention actually pay for them).

and has 0 comments
We all know that dogs are smart. They understand verbal commands and can make complex decisions in new situations. However, they can't speak. Well, there are some weird rare cases of dogs sort of snarling "mama", but it's not real speach.

Right now, though, I've had an epiphany: dogs WON'T SPEAK, because they simply are not equipped to. They are smart enough to try and learn from their failures. However, the dog that lives next to my office now howls to the same notes as the ambulances that pass by the building. Also there are numerous cases where dogs are howling in the tune of a song they hear.

Now this is my idea: what if dogs are able of speach, just not human one? What if a properly constructed highly vocal and high pitched language would work for dogs? WE could not speak dog then, but we are smart, we have devices and computers and stuff like that.

Update: Having thought a bit more about this I have come to a conclusion. It makes sense that dogs should be able to communicate by howling. Duh! They are descended from wolves. They are still, genetically speaking, wolves. What about the barking? Wolves bark when they are pups. Somehow, the domestication process makes canides retain some youthful characterstics. Therefore, it only makes sense that they should be able of communication at a higher level through howling rather than barking. Although, dogs being smart as they are, it is only one hypothesis that needs proof.

My friend, Meaflux, by his own description "an anthropology buff", reminded me of the other "smart animals", the Cetacea order, whales and dolphins and such. They sing, they use high pitched wails (whails? :D) to communicate. I agree, it makes sense underwater, but since they are descended from a wolf like ancestor and since fish don't use this communication system, I would say there is a strong connection.

So, in conclusion, it is possible that the pack communication method of wolf howling combined with the millenia old dog interaction with humans could result, with some training, in sone sort of meaningful conversation skills? If only people working with dogs and apes would read my blog...

Today I've updated my computer with the latest patches from Microsoft and then, starting a project, I noticed that it didn't look right in Internet Explorer 8. For example a table with an empty td of width 1px looked as if having 4px. Setting it to 2px or above made it look of having 2px or whatever value I had chosen. I have solved the situation by adding content to the td in question (a simple  ), but before today I have not had this problem.

Update: This blog post was previously called "Microsoft updates breaking changes?" but in the meanwhile I have determined what the problem was. It was the zoom! I had my IE set to 75% zoom. That caused the weird behaviours and appearance.

The solution is still working, but the problem should be rephrased as "Why do the widths of td elements behave strangely when setting smaller zoom in Internet Explorer?".

Just for kicks I tried duplicating the problem using the zoom:75% style setting on body and, even if it looked bad too, it was a completely different behaviour.

You may get an error of the form Cannot add content of type 'System.Windows.Style' to an object of type 'System.Windows.ResourceDictionary' when working with WPF and your first reaction would be "What?! Why not!?". Well, the issue is very simple, only it stems from another source entirely: you've just tried to add a Style with the same key as another previously entered style.

First time I've ever heard of cymatics and I am intrigued. basically you use some (physical) devices to visualize soundwaves. Here is a small TED presentation about it:



My question is simple: can this be used to "understand" sounds for deaf people or are the pattern transitions too complex? googling for cymatics I've found a lot of videos about water and cornstarch moved by sound and links to "sound healing" and even some technical papers that never seem to have left academia. I think this could be interesting enough to emulate on a computer, yet I have not found code for it yet.

and has 0 comments
This is mostly a rant, but also it should help people trying to do this as well to stop trying until there is some sort of solution from the VLC side.

I was trying to see how a web cam can be streamed over the web using VLC, a software that otherwise am very satisfied with as a video player. Recently they did a 1.0.0 version, which is quite something for free software that comes from the Linux world; usually they are 0.8 something and with a lot of alpha-beta-zeta afterward. So, as I was saying, recently VLC jumped from the 0.9.x version to 1.0.0, with a much more user friendly user interface and (at least so it seems to me) less adaptability than before. What I mean is that, in extreme cases, it throws errors that previous versions were able to circumvent, like when using partial or damaged video files. Also, it crashes on some older videos as well and I am forced to use the ancient (but sturdy) mplayer.

Back to business, I read the comprehensive command line help file that is almost 250k long, found what I was looking for, then tried. No success. I really felt like an idiot, as it wouldn't work whatever I did. In the end I just gave up and tried to start the streaming from the GUI, not from the command line. IT WORKED! Copying the exact command line parameters that the GUI would generate did not work. Saving the WORKING streaming to a playlist and then loading the playlist DID NOT WORK.

Here I have to say two things: when I say that it worked, it means that I had to fight it to be able to stream what I wanted and not HOW I wanted. Basically, the streaming will not work AT ALL if transcoding is not activated, which I personally think it makes it unusable anyway.

So, bottom line is that if you are trying to use VLC 1.0 from the command line, you are pretty much screwed. At least the flag that I was interested in (--dshow-vdev) would not select my web cam if its life depended on it. And it sort of did. Not likely I will use VLC in my business application.

I've even tried to go to one of those old style PHP forums that they have on the Videolan site. I waited for half an hour to receive the registration email and at that time I had given up completely. They had like 60.000 messages on the forums anyway and I doubt I would have gotten a reply any more intelligent than the usual RTFM. Yeah, I know, I sound very Linux unfriendly, but actually I am not, I've worked on Linux quite some time. What I am not friendly towards are the borderline psychotic assholes that only answer when they have nothing to actually say to help.

I believe this is something that any decent WPF programmer will laugh about, but there it is: I had this control derived from ContentControl and, of course, somewhere in the template I had a ContentPresenter. It all worked very well until I added a resizable option. I had two of these controls on the page, the first would contain a Grid, the other an ItemsControl. When I resized vertically the control, the ItemsControl would remain unchanged whether I made the height bigger or smaller. The Grid, though, would remain the same if enlarging the container and then squash when the size of the container got smaller than its auto size.

I have to say that I think my solution is really silly, but since it works: I've put a ScrollViewer control around the ContentPresenter in the my control template and then set its VerticalScrollBarVisibility to Hidden. This more or less is the same thing as setting overflow:hidden on the web.

Short (but true) story: I was compiling this solution with a lot of projects in it. And one of these projects had some post-build events set to run which copied the resulting dll in an Assemblies folder. Only it failed.

On building the project I was getting an error: The command "[Complete command]" exited with code 1.

What was weird about it is that if I copied the command in a batch file and ran it, it would work perfectly. After trying a zillion things I've stumbled upon the condition of build events Run the post-build event: which was set to On successful build. I set it to Always and voila, it worked.

But I still needed to know what was going on, especially since it would make no sense to run the copy command if the build has failed. So I switched it back to On successful build. Surprize! It also worked.

Therefore, the silly solution for a problem that doesn't make much sense is to switch to always run the build events, build successfully, then switch back and build again. Fun!

and has 0 comments

The fourth book by Alastair Reynolds that I've read recently, also set in the Revelation Space world, Absolution Gap follows the adventures of the ship Nostalgia for Infinity as it flees the "culling" of the Delta Pavonis star system by the swarm like machines called the Inhibitors. There is no purpose in reading the book without the others, as the story starts where it had left and continues to a more or less open ending.

This felt like the best book so far, however the enjoyment that I got from it had its very brutal ups and downs. While the beginning starts with full force and made me want to not let go of the book until I finish it, there was a side story that seemed not to have any connection with the main arc. When they finally met, they left me with that "What the fuck?" feeling. The ending was a jiggly up and down ranging from very cool and completely dumb. Not that the writing style faltered, but the behaviour of some of the characters really annoyed the crap out of me.

I would have to say that the ending was the most anticlimactic of all the books in the series, but the book is definitely the best yet.

Usually this happends in IE, but it may happen in a various other situations, given that Internet Explorer is famously bad, but also has to fight with all the backward compatibility and that new "innovative" browsers are on the way.

Let me make this easy: if it's a weird sixteen pixels difference (or somewhere around 16) then you probably are in one of these situations:
  • scrollbars - that you may not see, but they are there. I've just met this issue with a table of 100 percent width placed in a div of 100 percent width and it happened in IE8!
  • line-height - this is usually with Internet Explorer 6 or less, divs that are 16px in height when they have no content and have a specified lower height
  • font-size - also something from the older browsers

and has 0 comments
Nothing interesting to say myself, so I am linking to random blog posts :) Here is one that describes 31 types of refactoring, with examples and everything:

31 Days of Refactoring.

and has 0 comments
Count Zero is the middle volume of the Sprawl trilogy written by William Gibson, which includes Neuromancer, Count Zero, and Mona Lisa Overdrive, all of them very good books and set in the same universe as the short stories Johnny Mnemonic, New Rose Hotel and Burning Chrome.

I had read this book when I was a child and I loved it a lot. Circumstances moved me towards reading it again and I am glad they did. In my youth I had barely understood it and I can't say I did a lot better now either; that's because Gibson is one of the mature writers, writing for the mind and heart of adults.

Count Zero in particular, it felt like something one must feel through bones, must sip the content like a good coffee and digest the content with one's soul. Alas, I am not that kind of a guy, so I read it fast in the subway while going to work, in big gulps, like the glutton I am. I highly recommend the former approach ;)

The plot itself is like a high tech detective story, but it is almost irrelevant. Gibson has such a clear and powerful vision of the future, that it subjugates all of its characters to it and makes it, the future, the main character. Many things are not said, but left to be understood, like the reasons while the world is the way it is and why people act the way they do. Read Count Zero, even if you are not a sci-fi reader, because beyond the storyline there are layers upon layers of worldliness and it is a great book.

I had this expand/collapse div on which I was using slideToggle to make it look good. However, in quirks mode (HTML Transitional 4.01 DocType) and on IE7 the div would briefly pop up after collapsing, showing an annoying flicker. It seems that Internet Explorer has a problem rendering stuff with height 0px.

The solution I found: replace target.slideUp(speed,callBack) with
var h = target.height();
var cssHeight=target.css('height');
target.animate(
{ height: '1px' }, speed, function() {
target.hide();
target.height(h);
target.css('height',cssHeight);
callBack();
}
);
I have also created a jQuery ticket to suggest they use the same method in the library itself.

Update 1 Sep 2009: I have added the cssHeight variable to restore the actual css height settings, not just the height.

Update 21 May 2011: commenter Mads shared a more elegant solution in the form of this script:
(function(){
// Define overriding method.
jQuery.fx.prototype.hide = function(){

// Remember where we started, so that we can go back to it later
this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
this.options.hide = true;

// Begin the animation
this.custom(this.cur(), 1);
}
})();
used anywhere after the jQuery include. Thanks, man!

and has 0 comments

It wasn't a very memorable trip, but I had to write this because of the Bohemi hotel in Arbanasi, which must most certainly be avoided. And it was, overall, a nice holiday. But let me take it from the beginning.

We took the car starting up from Bucharest and went towards Veliko Tarnovo. We passed through Basarbovo, to visit the rock monastery there. Very nice place, if you like churches. They have these small rock dug rooms where priests used to live and pray and then the monastery which was in renovation when we came there, but had a very lovely garden.

We then moved towards Cherven, where we visited the castle dig which is archaeologically active. It is a large XIV century Christian fortress, where one can see how people lived in the day: small one room living quarters and then a gazillion churches, large and small, then some administrative buildings and some defence walls and watch towers. There are about 200 stair steps to reach the castle from where the car road ends.

Next was Ivanovo. Some other rock monasteries, but everything set inside a natural reserve, a very beautiful place.

Then we went towards Arbanasi, a touristic area where there are a lot of hotels and where we arranged for accomodations. The hotel we chose was a three star hotel called Bohemi, boasting internet, minibars, outdoor oven, breakfast, etc, depending on the tourist site you search for it. Let me tell you how it really is: it's a two star hotel with smelly rooms, no parking, invaded by insects and spiders (and a scorpion which scared the craop out of my wife), no internet, no minibars, with a breakfast as the ones from the communist era: some bread and butter and jam and some salami/cheese slices. The hotel itself is one of many owned by the same people, so the person serving there is only an employee, put there to mind the place. In the room, after we got used with the stale odor of moist walls, we noticed that we has not enough sheets and two out of four light bulbs were not functioning. Really, I can't stress enough: 35 euros per night?! In times of economic crisis and with this kind of service? Avoid!

Arbanasi itself is not a bad place to stay, eat, sleep, and then back again. It would have killed me with boredom if I didn't have a car. They have a monastery there, but by then I got tired of any type of religious building. The restaurants where very nice, but service was consistently bad. I haven't seen dumber waiters in quite a while.

Veliko Tarnovo is a large city, once the capital of the second Bulgarian empire.

The stronghold there is a very nice place, where they don't allow sale people and where people can see theater and sound/light shows in the evening. Very large, beautiful and accomodating. Then there are some monuments and some nice streets.
The city itself is pretty cool. Lots of churches, of course :) I am sure that, being with my parents, I missed a lot of the hidden beauty of the town, but it was nice nonetheless.





That was about it. Take the links to get more information. My general opinion of Bulgaria is that it is a nice country, beatiful and wild, but rather poor. All the small towns and villages we passed through looked half abandoned, with many disaffected buildings and very few people. The economic crisis must have hit them pretty hard, too.